From MAILER-DAEMON Fri Feb 05 17:09:19 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NdWMZ-0001B4-Lt
	for mharc-myserver-commit@gnu.org; Fri, 05 Feb 2010 17:09:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NdWMX-00019z-QG
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 17:09:17 -0500
Received: from [199.232.76.173] (port=42892 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NdWMX-00019D-7J
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 17:09:17 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1NdWMS-0000BT-Av
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 17:09:16 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:33365
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1NdWMR-0000BF-Tt
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 17:09:12 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NdWMR-0007hb-I5
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 22:09:11 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NdWMR-0002Dn-7s
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 22:09:11 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 552edb32dbb25ee790eab53b2ec50af8711b633e
X-Git-Newrev: 9271f7e34f89746ca5b5b8bc896e2d957b8c8c16
Message-Id: <E1NdWMR-0002Dn-7s@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 05 Feb 2010 22:09:11 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-22-g9271f7e
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Feb 2010 22:09:18 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  9271f7e34f89746ca5b5b8bc896e2d957b8c8c16 (commit)
       via  11886e84467af717660cd6eed326bd1e2b367662 (commit)
      from  552edb32dbb25ee790eab53b2ec50af8711b633e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 9271f7e34f89746ca5b5b8bc896e2d957b8c8c16
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 5 23:02:22 2010 +0100

    Use new gnulib modules for Win32 sockets functions.

diff --git a/myserver/bootstrap.conf b/myserver/bootstrap.conf
index 2a7c753..23e9241 100644
--- a/myserver/bootstrap.conf
+++ b/myserver/bootstrap.conf
@@ -23,18 +23,31 @@ SKIP_PO=t
 
 # gnulib modules used by this package.
 gnulib_modules="
+accept
+argp
+bind
 chdir-long
 crypto/md5
 crypto/sha1
+connect
 getcwd
 gethostname
+getsockname
 gettext
 gettimeofday
+listen
 mktime
 nproc
 pipe
+recv
 regex
+select
+send
+setsockopt
+shutdown
 snprintf
+socket
+sysexits
 unlink
 "
 
diff --git a/myserver/configure.ac b/myserver/configure.ac
index 3d5c77b..5300208 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -48,7 +48,6 @@ AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 
 AC_CANONICAL_HOST
-AC_LIBTOOL_WIN32_DLL
 
 PACKAGE_STRING="m4_esyscmd([cat version])"
 MYSERVER_VERSION="${PACKAGE_STRING}"
@@ -95,7 +94,7 @@ AC_CHECK_LIB(gcrypt, gcry_control)
 
 case "${host}" in
     *-*-mingw32*)
-     LDFLAGS="-lwsock32 -lgdi32 -lole32  -luuid -luserenv $LDFLAGS"
+     LDFLAGS="-lwsock32 -lws2_32 -lgdi32 -lole32  -luuid -luserenv $LDFLAGS"
      MAKE_MSCGI=yes
      ;;
   *)
@@ -156,16 +155,6 @@ AC_SEARCH_LIBS([event_add], [event event_core event_extra])
 AC_CHECK_FUNCS(event_loopbreak, AC_DEFINE(EVENT_LOOPBREAK, 1,
                          [Define if the event_loopbreak function is present]))
 
-dnl check for Unix98 socklen_t
- AC_MSG_CHECKING(if socklen_t is defined)
- AC_TRY_COMPILE(
-     [#include <sys/socket.h>],
-     [socklen_t len = 10; return len;],
-        [AC_MSG_RESULT(yes)],
-        [AC_MSG_RESULT(no)
-         AC_DEFINE(socklen_t, int, define this where socklen_t is not present)])
-
-
 # Libidn checks
 # -------------
 AC_CHECK_HEADER(idna.h,, 
diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index f34bcef..9c3c9bc 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -20,27 +20,24 @@
 #ifndef SOCKET_H
 # define SOCKET_H
 
-# include "myserver.h"
-# include <include/filter/stream.h>
+# define GNULIB_SOCKET 1
 
-# include <string>
-using namespace std;
+# include "myserver.h"
 
-# ifdef WIN32
-#  ifndef SOCKETLIBINCLUDED
 extern "C"
 {
-#   include <winsock2.h>
+# include <sys/types.h>
+# include <sys/socket.h>
 }
-#   define SOCKETLIBINCLUDED
-#  endif
-# endif
+
+# include <include/filter/stream.h>
+
+# include <string>
+using namespace std;
 
 # ifndef WIN32
 extern "C"
 {
-#  include <sys/types.h>
-#  include <sys/socket.h>
 #  include <sys/ioctl.h>
 #  include <netinet/in.h>
 #  include <netdb.h>
diff --git a/myserver/include/base/socket/ssl_socket.h b/myserver/include/base/socket/ssl_socket.h
index 75eaecb..909cbe4 100644
--- a/myserver/include/base/socket/ssl_socket.h
+++ b/myserver/include/base/socket/ssl_socket.h
@@ -21,6 +21,13 @@
 # define SSL_SOCKET_H
 
 # include "myserver.h"
+
+extern "C"
+{
+#  include <sys/types.h>
+#  include <sys/socket.h>
+}
+
 # include <include/base/socket/socket.h>
 # include <include/base/ssl/ssl.h>
 
@@ -32,8 +39,6 @@ using namespace std;
 
 # ifndef WIN32
 extern "C" {
-#  include <sys/types.h>
-#  include <sys/socket.h>
 #  include <sys/ioctl.h>
 #  include <netinet/in.h>
 #  include <netdb.h>
diff --git a/myserver/lib/Makefile.am b/myserver/lib/Makefile.am
index 9286877..03c83fb 100644
--- a/myserver/lib/Makefile.am
+++ b/myserver/lib/Makefile.am
@@ -9,13 +9,29 @@
 ## (at your option) any later version.
 ##
 ## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## but WITHOUT ANY WARRANTY
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+GNULIB_SOCKET=1
+GNULIB_CONNECT=1
+GNULIB_ACCEPT=1
+GNULIB_BIND=1
+GNULIB_GETPEERNAME=1
+GNULIB_GETSOCKNAME=1
+GNULIB_GETSOCKOPT=1
+GNULIB_LISTEN=1
+GNULIB_RECV=1
+GNULIB_SEND=1
+GNULIB_RECVFROM=1
+GNULIB_SENDTO=1
+GNULIB_SETSOCKOPT=1
+GNULIB_SHUTDOWN=1
+GNULIB_ACCEPT4=1
+
 include gnulib.mk
 
 # Dirty hack.  FIXME!
diff --git a/myserver/myserver.h b/myserver/myserver.h
index a95f286..92b94e9 100644
--- a/myserver/myserver.h
+++ b/myserver/myserver.h
@@ -19,24 +19,26 @@
 #ifndef STDAFX_H
 #define STDAFX_H
 
+extern "C"
+{
 #ifndef WIN32
 # include "config.h"
 #endif
 
 #ifdef HAVE_CONFIG_H
 # include <cstdlib>
-# include "time.h"
+/*# include "time.h"*/
 # include <config.h>
 #endif
 
 #ifdef HAVE_PTHREAD
 # include <pthread.h>
 #endif
+}
 
 #ifdef WIN32
 extern "C"
 {
-# include <winsock2.h>
 # include <tchar.h>
 # include <process.h>
 }
@@ -71,9 +73,12 @@ typedef void* HANDLE;
 
 #endif
 
+extern "C"
+{
 #ifdef HAVE_GETTEXT
 # include <libintl.h>
 # define _(X) gettext (X)
 #else
 # define _(X) X
 #endif
+}
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index bdfc934..f7d9dff 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -18,12 +18,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #include "myserver.h"
-#include <include/base/utility.h>
+
 #include <include/base/socket/socket.h>
+#include <include/base/utility.h>
+
 extern "C"
 {
-#include <string.h>
-#include <stdio.h>
 #ifndef WIN32
 # include <sys/types.h>
 # include <sys/socket.h>
@@ -34,6 +34,7 @@ extern "C"
 # include <arpa/inet.h>
 #endif
 
+#include <sys/select.h>
 #include <errno.h>
 }
 
@@ -181,7 +182,7 @@ int Socket::bind (MYSERVER_SOCKADDR* sa,int namelen)
     return -1;
 
 #ifdef WIN32
-  return ::bind (socketHandle, (const struct sockaddr*)sa, namelen);
+  return ::bind (socketHandle, (struct sockaddr*) sa, namelen);
 #else
   return ::bind (socketHandle, (const struct sockaddr*)sa, namelen);
 #endif
@@ -567,7 +568,7 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
     return -1;
 
 #ifdef WIN32
-  return ::connect (socketHandle,(const sockaddr *)sa, na);
+  return ::connect (socketHandle,(sockaddr *)sa, na);
 #else
   return ::connect (socketHandle,(const sockaddr *)sa,na);
 #endif
diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index 60610bf..0b4c9cf 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -125,7 +125,7 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
     return -1;
 
   /*! Do the TCP connection. */
-  if (::connect ((int)socketHandle,(const sockaddr *)sa, na))
+  if (::connect ((int) socketHandle,(sockaddr *) sa, na))
   {
     SSL_CTX_free (sslContext);
     sslContext = 0;
diff --git a/myserver/src/base/socket_pair/socket_pair.cpp b/myserver/src/base/socket_pair/socket_pair.cpp
index c8d574f..ec26eff 100644
--- a/myserver/src/base/socket_pair/socket_pair.cpp
+++ b/myserver/src/base/socket_pair/socket_pair.cpp
@@ -97,7 +97,7 @@ int SocketPair::create ()
   addr.sin_addr.s_addr = htonl (0x7f000001);
   addr.sin_port = 0;
 
-  e = ::bind (listener, (const struct sockaddr*) &addr, sizeof (addr));
+  e = ::bind (listener, (struct sockaddr*) &addr, sizeof (addr));
   if (e == SOCKET_ERROR)
     {
       closesocket (listener);
@@ -117,7 +117,8 @@ int SocketPair::create ()
         break;
       if ((handles[0] = ::socket (AF_INET, type, 0)) == INVALID_SOCKET)
         break;
-      if (::connect (handles[0], (const struct sockaddr*) &addr, sizeof (addr)) == SOCKET_ERROR)
+      if (::connect (handles[0], (struct sockaddr*) &addr, sizeof (addr))
+          == SOCKET_ERROR)
         break;
       if ((handles[1] = ::accept (listener, NULL, NULL)) == INVALID_SOCKET)
         break;



commit 11886e84467af717660cd6eed326bd1e2b367662
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 5 15:15:32 2010 +0100

    Remove EVENT_LIB variable definition

diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index c002fa7..b68d923 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -9,7 +9,9 @@ libmath_sum.a :
 
 math_sum.mscgi : $(libmath_sum_a_OBJECTS) $(libmath_sum_a_DEPENDENCIES)
 	-rm -f math_sum.mscgi
-	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a  $(libmath_sum_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a  $(libmath_sum_a_LIBADD) \
+	$(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi \
+	-shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : math_sum.mscgi
 	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi'
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index a397eed..0f10994 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -10,7 +10,9 @@ libpost.a :
 
 post.mscgi : $(libpost_a_OBJECTS) $(libpost_a_DEPENDENCIES)
 	-rm -f post.mscgi
-	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a ../../../../lib/libgnu.a $(libpost_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a ../../../../lib/libgnu.a $(libpost_a_LIBADD) \
+	$(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) \
+	-o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : post.mscgi
 	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi'
diff --git a/myserver/configure.ac b/myserver/configure.ac
index 8cb05ca..3d5c77b 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -151,19 +151,7 @@ else
 fi
 AC_SUBST(XNET_LIB)
 
-AC_SEARCH_LIBS([event_add], [event event_core event_extra],  have_event=yes)
-AC_CHECK_LIB([event],  [event_add],  have_event=yes)
-if test x$have_event = xyes; then
-   EVENT_LIB="-levent"
-else
-   EVENT_LIB=""
-
-   AC_MSG_ERROR([
-*** This system appears to have no libevent
-*** Libevent is required by MyServer
-      ])
-fi
-AC_SUBST(EVENT_LIB)
+AC_SEARCH_LIBS([event_add], [event event_core event_extra])
 
 AC_CHECK_FUNCS(event_loopbreak, AC_DEFINE(EVENT_LOOPBREAK, 1,
                          [Define if the event_loopbreak function is present]))
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index ffa999a..d1244c8 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -7,7 +7,7 @@ myserver_SOURCES = myserver.cpp
 myserver_CXXFLAGS = $(CXXFLAGS) $(XML_CFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
 myserver_LDFLAGS =  -rdynamic
 myserver_LDADD = libmyserver.a $(PTHREAD_LIB) $(IDN_LIB) \
-	$(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) \
+	$(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) \
 	$(XML_LIBS)  ../lib/libgnu.a $(LDFLAGS)
 
 clean-libmyserver.a:
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 6f82483..441b048 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -65,7 +65,7 @@ test_suite_SOURCES =  	main.cpp				\
 			test_xml_validator.cpp
 
 test_suite_LDADD = ../src/libmyserver.a  ../lib/libgnu.a $(CPPUNIT_LDFLAGS) \
-	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) \
+	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) \
 	$(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS)
 
 install:

-----------------------------------------------------------------------

Summary of changes:
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |    4 ++-
 myserver/binaries/web/cgi-src/post/Makefile.am     |    4 ++-
 myserver/bootstrap.conf                            |   13 +++++++++
 myserver/configure.ac                              |   27 +------------------
 myserver/include/base/socket/socket.h              |   21 ++++++---------
 myserver/include/base/socket/ssl_socket.h          |    9 +++++-
 myserver/lib/Makefile.am                           |   18 ++++++++++++-
 myserver/myserver.h                                |    9 +++++-
 myserver/src/Makefile.am                           |    2 +-
 myserver/src/base/socket/socket.cpp                |   11 ++++---
 myserver/src/base/socket/ssl_socket.cpp            |    2 +-
 myserver/src/base/socket_pair/socket_pair.cpp      |    5 ++-
 myserver/tests/Makefile.am                         |    2 +-
 13 files changed, 73 insertions(+), 54 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 05 19:40:50 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NdYjC-0004sJ-Ix
	for mharc-myserver-commit@gnu.org; Fri, 05 Feb 2010 19:40:50 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NdYjB-0004rM-7R
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 19:40:49 -0500
Received: from [199.232.76.173] (port=51335 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NdYjA-0004r1-Tc
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 19:40:48 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1NdYj9-0006Xk-EC
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 19:40:48 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:57672
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1NdYj9-0006XS-6f
	for myserver-commit@gnu.org; Fri, 05 Feb 2010 19:40:47 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NdYj6-0001BM-15
	for myserver-commit@gnu.org; Sat, 06 Feb 2010 00:40:46 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NdYiu-0007sr-9a
	for myserver-commit@gnu.org; Sat, 06 Feb 2010 00:40:36 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9271f7e34f89746ca5b5b8bc896e2d957b8c8c16
X-Git-Newrev: 0729c236837deda9b59305ef9d7a731788e6926b
Message-Id: <E1NdYiu-0007sr-9a@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 06 Feb 2010 00:40:32 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-23-g0729c23
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 06 Feb 2010 00:40:49 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  0729c236837deda9b59305ef9d7a731788e6926b (commit)
      from  9271f7e34f89746ca5b5b8bc896e2d957b8c8c16 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 0729c236837deda9b59305ef9d7a731788e6926b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 6 01:34:58 2010 +0100

    Include config.h in any case

diff --git a/myserver/bootstrap.conf b/myserver/bootstrap.conf
index 23e9241..f4aefb8 100644
--- a/myserver/bootstrap.conf
+++ b/myserver/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,6 +36,7 @@ getsockname
 gettext
 gettimeofday
 listen
+malloc
 mktime
 nproc
 pipe
diff --git a/myserver/myserver.h b/myserver/myserver.h
index 92b94e9..13e5af5 100644
--- a/myserver/myserver.h
+++ b/myserver/myserver.h
@@ -21,29 +21,13 @@
 
 extern "C"
 {
-#ifndef WIN32
-# include "config.h"
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <cstdlib>
-/*# include "time.h"*/
-# include <config.h>
-#endif
+#include "config.h"
 
 #ifdef HAVE_PTHREAD
 # include <pthread.h>
 #endif
 }
 
-#ifdef WIN32
-extern "C"
-{
-# include <tchar.h>
-# include <process.h>
-}
-#endif
-
 extern "C"
 {
 #include <stdlib.h>
@@ -54,7 +38,10 @@ extern "C"
 #include <ctype.h>
 #include <stdint.h>
 
-#ifndef WIN32
+#ifdef WIN32
+# include <tchar.h>
+# include <process.h>
+#else
 # include <sys/types.h>
 # include <sys/stat.h>
 # include <limits.h>

-----------------------------------------------------------------------

Summary of changes:
 myserver/bootstrap.conf |    3 ++-
 myserver/myserver.h     |   23 +++++------------------
 2 files changed, 7 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Feb 07 19:29:09 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NeHUz-0001Os-Oh
	for mharc-myserver-commit@gnu.org; Sun, 07 Feb 2010 19:29:09 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NeHUy-0001OF-2t
	for myserver-commit@gnu.org; Sun, 07 Feb 2010 19:29:08 -0500
Received: from [199.232.76.173] (port=51876 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NeHUx-0001Nu-Eo
	for myserver-commit@gnu.org; Sun, 07 Feb 2010 19:29:07 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1NeHUk-0001st-7t
	for myserver-commit@gnu.org; Sun, 07 Feb 2010 19:29:07 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:47117
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1NeHUj-0001sZ-Ez
	for myserver-commit@gnu.org; Sun, 07 Feb 2010 19:28:54 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NeHUj-0007Zo-5o
	for myserver-commit@gnu.org; Mon, 08 Feb 2010 00:28:53 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NeHUi-0007Wq-SD
	for myserver-commit@gnu.org; Mon, 08 Feb 2010 00:28:53 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0729c236837deda9b59305ef9d7a731788e6926b
X-Git-Newrev: ae0ca1765d0a274fc25ceae00c15893ee15421db
Message-Id: <E1NeHUi-0007Wq-SD@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 08 Feb 2010 00:28:52 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-42-gae0ca17
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Feb 2010 00:29:08 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  ae0ca1765d0a274fc25ceae00c15893ee15421db (commit)
       via  5e694f2c1922d5ffd5b165bd6dbabb3223c45c29 (commit)
       via  85b5a3a815bd84e1f4007bbac907d7704bffe69d (commit)
       via  09b658b28fa860acd80fed886efa59a1d6ab4bec (commit)
       via  b4a3446ea120b33a3286ee4cf0a24175d4fa69a6 (commit)
       via  ab7dfdd846bd2f82c2251b0355c1e101b1e5cda0 (commit)
       via  5ba9ccf2685c25144ccb075cf5db5d9ddac22e86 (commit)
       via  230c8f864bed5aa1319632792115fa94813668d1 (commit)
       via  b519d1e92574ff12ea1eb3ed5ccdd27acda2a352 (commit)
       via  c4888d7dda42af77c121ac44c0e33cdd77607ed9 (commit)
       via  186671520aa491cd2c15baeee041f72924c01cd7 (commit)
       via  45e2728b407644b8e1e11dd39c7a702a7594d6b2 (commit)
       via  cebcda83a6dc078a4df2c78f0c288ebe79792832 (commit)
       via  242eaf7bfe64bfdd3542d594f15a558b88dc256d (commit)
       via  dfa646f8a4824e220a2ed2a3122445d374d1619f (commit)
       via  ec946148004db983a871fb4d27ca4ac0071257fb (commit)
       via  d1cd168cd5c1ba67d472fdacdbf59df00a175d5f (commit)
       via  3dec625c9f5f81c04921338dc90f235ab1513cca (commit)
       via  6e98f3e19361364be62c98196e1de5b84455cc96 (commit)
      from  0729c236837deda9b59305ef9d7a731788e6926b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit ae0ca1765d0a274fc25ceae00c15893ee15421db
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 8 01:29:21 2010 +0100

    Remove WIN32 legacy code in favor of gnulib abstractions

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index 9c3c9bc..92352b8 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -49,11 +49,7 @@ extern "C"
 #  define SD_BOTH SHUT_RDWR
 # endif
 
-# ifdef WIN32
-typedef SOCKET SocketHandle;
-# else
 typedef int SocketHandle;
-# endif
 
 # ifdef INET6_ADDRSTRLEN
 #  define MAX_IP_STRING_LEN  INET6_ADDRSTRLEN
diff --git a/myserver/include/base/socket/ssl_socket.h b/myserver/include/base/socket/ssl_socket.h
index 909cbe4..72bf6b7 100644
--- a/myserver/include/base/socket/ssl_socket.h
+++ b/myserver/include/base/socket/ssl_socket.h
@@ -36,17 +36,6 @@ using namespace std;
 
 # include <gnutls/openssl.h>
 
-
-# ifndef WIN32
-extern "C" {
-#  include <sys/ioctl.h>
-#  include <netinet/in.h>
-#  include <netdb.h>
-#  include <stdio.h>
-#  include <unistd.h>
-}
-# endif
-
 class SslSocket : public Socket
 {
 public:
@@ -70,12 +59,13 @@ public:
   virtual int dataOnRead (int sec = 0, int usec = 500);
 # endif
 
+  SslSocket ();
   SslSocket (Socket*);
   virtual ~SslSocket ();
 
 protected:
   bool externalContext;
-  Socket* socket;
+  Socket* sock;
   SSL *sslConnection;
   SSL_CTX *sslContext;
   const X509 *clientCert;
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index e06341c..661fc84 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -24,12 +24,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 extern "C"
 {
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+
 #ifndef WIN32
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <sys/ioctl.h>
-# include <netdb.h>
 # include <unistd.h>
+# include <netdb.h>
 # include <netinet/in.h>
 # include <arpa/inet.h>
 #endif
@@ -48,16 +49,12 @@ using namespace std;
 int Socket::startupSocketLib ()
 {
 #ifdef WIN32
-  /*
-   *Under windows we need to initialize the socket library before use it.
-   */
   static bool done = false;
-
   if (!done)
     {
       WSADATA wsaData;
       done = true;
-      return WSAStartup (MAKEWORD ( 1, 1), &wsaData);
+      return WSAStartup (MAKEWORD (1, 1), &wsaData);
     }
 #endif
   return 0;
@@ -103,12 +100,8 @@ int Socket::operator=(Socket* s)
  */
 int Socket::socket (int af, int type, int protocol)
 {
-#ifdef WIN32
-  socketHandle = ::socket (af, type, protocol);
-#else
   socketHandle = ::socket (af, type, protocol);
-#endif
-  return (int)socketHandle;
+  return socketHandle;
 }
 
 /*!
@@ -169,23 +162,19 @@ Socket::Socket ()
 /*!
  *Bind the port to the socket.
  */
-int Socket::bind (MYSERVER_SOCKADDR* sa,int namelen)
+int Socket::bind (MYSERVER_SOCKADDR* sa, int namelen)
 {
-   if ( sa == NULL )
-      return -1;
+  if ( sa == NULL )
+    return -1;
 
   if ((sa->ss_family == AF_INET && namelen != sizeof (sockaddr_in))
 #if HAVE_IPV6
-  || (sa->ss_family == AF_INET6 && namelen != sizeof (sockaddr_in6))
+      || (sa->ss_family == AF_INET6 && namelen != sizeof (sockaddr_in6))
 #endif
-       )
+      )
     return -1;
 
-#ifdef WIN32
   return ::bind (socketHandle, (struct sockaddr*) sa, namelen);
-#else
-  return ::bind (socketHandle, (const struct sockaddr*)sa, namelen);
-#endif
 }
 
 /*!
@@ -193,11 +182,7 @@ int Socket::bind (MYSERVER_SOCKADDR* sa,int namelen)
  */
 int Socket::listen (int max)
 {
-#ifdef WIN32
   return ::listen (socketHandle, max);
-#else
-  return ::listen (socketHandle, max);
-#endif
 }
 
 /*!
@@ -209,7 +194,7 @@ Socket* Socket::accept (MYSERVER_SOCKADDR* sa, socklen_t* sockaddrlen)
                                           sockaddrlen);
 
   if (acceptedHandle >= 0)
-    return new Socket ((SocketHandle)acceptedHandle);
+    return new Socket ((SocketHandle) acceptedHandle);
   else
     return NULL;
 }
@@ -221,13 +206,8 @@ int Socket::close ()
 {
   int ret = -1;
   if (socketHandle >= 0)
-    {
-#ifdef WIN32
-      ret = ::closesocket (socketHandle);
-#else
-      ret = ::close (socketHandle);
-#endif
-    }
+    ret = ::close (socketHandle);
+
   socketHandle = -1;
   return ret;
 }
@@ -237,12 +217,7 @@ int Socket::close ()
  */
 MYSERVER_HOSTENT *Socket::gethostbyaddr (char* addr, int len, int type)
 {
-#ifdef WIN32
-  HOSTENT *he = ::gethostbyaddr (addr,len,type);
-#else
-  struct hostent * he = ::gethostbyaddr (addr,len,type);
-#endif
-  return he;
+  return (MYSERVER_HOSTENT *) ::gethostbyaddr (addr, len, type);
 }
 
 /*!
@@ -250,7 +225,7 @@ MYSERVER_HOSTENT *Socket::gethostbyaddr (char* addr, int len, int type)
 */
 MYSERVER_HOSTENT *Socket::gethostbyname (const char *hostname)
 {
-  return (MYSERVER_HOSTENT *)::gethostbyname (hostname);
+  return (MYSERVER_HOSTENT *) ::gethostbyname (hostname);
 }
 
 /*!
@@ -279,7 +254,7 @@ int Socket::getLocalIPsList (string &out)
   memset (serverName, 0, HOST_NAME_MAX + 1);
 
   Socket::gethostname (serverName, HOST_NAME_MAX);
-#if ( HAVE_IPV6 )
+#if HAVE_IPV6
   addrinfo aiHints = { 0 }, *pHostInfo = NULL, *pCrtHostInfo = NULL;
   /* only interested in socket types the that server will listen to.  */
   aiHints.ai_socktype = SOCK_STREAM;
@@ -351,14 +326,7 @@ int Socket::getLocalIPsList (string &out)
  */
 int Socket::rawSend (const char* buffer, int len, int flags)
 {
-#ifdef WIN32
-  int ret;
-  SetLastError (0);
-
-  return ::send (socketHandle, buffer, len, flags);
-#else
   return ::send (socketHandle, buffer, len, flags);
-#endif
 }
 
 /*!
@@ -409,13 +377,9 @@ int Socket::send (const char* buffer, int len, int flags)
 /*!
  *Function used to control the socket.
  */
-int Socket::ioctlsocket (long cmd,unsigned long* argp)
+int Socket::ioctlsocket (long cmd, unsigned long* argp)
 {
-#ifdef WIN32
-  return ::ioctlsocket (socketHandle, cmd, argp);
-#else
   return ::ioctl (socketHandle, cmd, argp);
-#endif
 }
 
 /*!
@@ -427,7 +391,7 @@ int Socket::connect (const char* host, u_short port)
   if ( host == NULL )
     return -1;
 
-#if ( HAVE_IPV6 )
+#if HAVE_IPV6
   MYSERVER_SOCKADDRIN thisSock = { 0 };
   int nLength = sizeof (MYSERVER_SOCKADDRIN);
   int nSockLen = 0;
@@ -563,11 +527,7 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
  )
     return -1;
 
-#ifdef WIN32
-  return ::connect (socketHandle,(sockaddr *)sa, na);
-#else
-  return ::connect (socketHandle,(const sockaddr *)sa,na);
-#endif
+  return ::connect (socketHandle, (sockaddr *) sa, na);
 }
 
 /*!
@@ -589,17 +549,6 @@ int Socket::recv (char* buffer,int len,int flags)
 {
   int err = 0;
 
-#ifdef WIN32
-  err = ::recv (socketHandle, buffer, len, flags);
-
-  if ( err == SOCKET_ERROR && GetLastError () == WSAEWOULDBLOCK && isNonBlocking)
-    return 0;
-
-  if (err == SOCKET_ERROR)
-    return -1;
-  else
-    return err;
-#else
   err = ::recv (socketHandle, buffer, len, flags);
 
   if ( err < 0 && errno == EAGAIN && isNonBlocking)
@@ -609,8 +558,6 @@ int Socket::recv (char* buffer,int len,int flags)
     err = -1;
 
   return err;
-#endif
-
 }
 
 /*!
@@ -631,23 +578,22 @@ u_long Socket::bytesToRead ()
 }
 
 /*!
- *Change the socket behaviour when an operation can't be completed
- *immediately.
- *If the socket is configured to be non blocking then it will return
- *immediately the control to the caller function.
- *A blocking socket will wait until the operation can be performed.
- *\param nonBlocking Nonzero to configure the socket non blocking.
+ * Change the socket behaviour when an operation can't be completed
+ * immediately.
+ * If the socket is configured to be non blocking then it will return
+ * immediately the control to the caller function.
+ * A blocking socket will wait until the operation can be performed.
+ * \param nonBlocking Nonzero to configure the socket non blocking.
  */
 int Socket::setNonBlocking (int nonBlocking)
 {
   int ret = -1;
+  int flags;
+
 #ifdef WIN32
   u_long nonblock = nonBlocking ? 1 : 0;
-  ret = ioctlsocket ( FIONBIO, &nonblock);
-
+  ret = ioctlsocket (FIONBIO, &nonblock);
 #else
-
-  int flags;
   flags = fcntl (socketHandle, F_GETFL, 0);
   if (flags < 0)
     return -1;
@@ -659,8 +605,9 @@ int Socket::setNonBlocking (int nonBlocking)
 
   ret = fcntl (socketHandle, F_SETFL, flags);
 
-#endif
   isNonBlocking = nonBlocking ? true : false;
+#endif
+
   return ret;
 }
 
@@ -677,14 +624,10 @@ int Socket::gethostname (char *name, int namelen)
  */
 int Socket::getsockname (MYSERVER_SOCKADDR *ad, int *namelen)
 {
-#ifdef WIN32
-  return ::getsockname (socketHandle,(sockaddr *)ad,namelen);
-#else
   socklen_t len =(socklen_t) *namelen;
   int ret = ::getsockname (socketHandle, (struct sockaddr *)ad, &len);
   *namelen = (int)len;
   return ret;
-#endif
 }
 
 /*!
@@ -715,11 +658,8 @@ int Socket::dataOnRead (int sec, int usec)
   tv.tv_usec = usec;
 
   FD_ZERO (&readfds);
-#ifdef WIN32
   FD_SET (socketHandle, &readfds);
-#else
-  FD_SET (socketHandle, &readfds);
-#endif
+
   ret = ::select (socketHandle + 1, &readfds, NULL, NULL, &tv);
 
   if (ret <= 0)
diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index 0b4c9cf..ca0f017 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -1,19 +1,19 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free
+  Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 
@@ -21,13 +21,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/utility.h>
 #include "include/base/socket/ssl_socket.h"
 
-extern "C" {
+extern "C"
+{
 #include <string.h>
 #include <stdio.h>
-#ifndef WIN32
 # include <sys/types.h>
 # include <sys/socket.h>
 # include <sys/ioctl.h>
+#ifndef WIN32
 # include <netdb.h>
 # include <unistd.h>
 # include <netinet/in.h>
@@ -42,9 +43,19 @@ using namespace std;
 /*!
  *Constructor of the class.
  */
-SslSocket::SslSocket (Socket* socket) : Socket (socket)
+SslSocket::SslSocket (Socket* sock) : Socket (sock)
 {
-  this->socket = socket;
+  this->sock = sock;
+  sslConnection = 0;
+  sslContext = 0;
+  clientCert = 0;
+  sslMethod = 0;
+  externalContext = false;
+}
+
+SslSocket::SslSocket ()
+{
+  this->sock = NULL;
   sslConnection = 0;
   sslContext = 0;
   clientCert = 0;
@@ -63,7 +74,6 @@ SslSocket::~SslSocket ()
 int SslSocket::close ()
 {
   freeSSL ();
-
   return Socket::close ();
 }
 
@@ -73,15 +83,9 @@ int SslSocket::close ()
 int SslSocket::shutdown (int how)
 {
   if (sslConnection)
-  {
     SSL_shutdown (sslConnection);
-  }
 
-#ifdef WIN32
   return ::shutdown (socketHandle, how);
-#else
-  return ::shutdown ((int)socketHandle, how);
-#endif
 }
 
 /*!
@@ -93,11 +97,11 @@ int SslSocket::rawSend (const char* buffer, int len, int flags)
 {
   int err;
   do
-  {
-    err = SSL_write (sslConnection,buffer,len);
-  }while ((err <= 0) &&
-         (SSL_get_error (sslConnection,err) == SSL_ERROR_WANT_WRITE
-          || SSL_get_error (sslConnection,err) == SSL_ERROR_WANT_READ));
+    {
+      err = SSL_write (sslConnection, buffer, len);
+    }while ((err <= 0) &&
+            (SSL_get_error (sslConnection,err) == SSL_ERROR_WANT_WRITE
+             || SSL_get_error (sslConnection,err) == SSL_ERROR_WANT_READ));
   if (err <= 0)
     return -1;
   else
@@ -124,28 +128,28 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
   if (sslContext == 0)
     return -1;
 
-  /*! Do the TCP connection. */
-  if (::connect ((int) socketHandle,(sockaddr *) sa, na))
-  {
-    SSL_CTX_free (sslContext);
-    sslContext = 0;
-    return -1;
-  }
+  /*! Do the TCP connection.  */
+  if (::connect (socketHandle, (sockaddr *) sa, na))
+    {
+      SSL_CTX_free (sslContext);
+      sslContext = 0;
+      return -1;
+    }
   sslConnection = SSL_new (sslContext);
   if (sslConnection == 0)
-  {
-    SSL_CTX_free (sslContext);
-    sslContext = 0;
-    return -1;
-  }
-  SSL_set_fd (sslConnection, (int)socketHandle);
+    {
+      SSL_CTX_free (sslContext);
+      sslContext = 0;
+      return -1;
+    }
+  SSL_set_fd (sslConnection, socketHandle);
   if (SSL_connect (sslConnection) < 0)
-  {
-    SSL_CTX_free (sslContext);
-    close ();
-    sslContext = 0;
-    return -1;
-  }
+    {
+      SSL_CTX_free (sslContext);
+      sslContext = 0;
+      return -1;
+    }
+
   externalContext = false;
   return 0;
 }
@@ -157,7 +161,6 @@ int SslSocket::setSSLContext (SSL_CTX* context)
 {
   sslContext = context;
   externalContext = true;
-
   return 1;
 }
 
@@ -168,16 +171,16 @@ int SslSocket::freeSSL ()
 {
   /*! free up the SSL context. */
   if (sslConnection)
-  {
-    SSL_free (sslConnection);
-    sslConnection = 0;
-  }
+    {
+      SSL_free (sslConnection);
+      sslConnection = 0;
+    }
 
   if (sslContext && !externalContext)
-  {
-    SSL_CTX_free (sslContext);
-    sslContext = 0;
-  }
+    {
+      SSL_CTX_free (sslContext);
+      sslContext = 0;
+    }
   return 1;
 }
 
@@ -203,32 +206,30 @@ int SslSocket::sslAccept ()
     freeSSL ();
   sslConnection = SSL_new (sslContext);
   if (sslConnection == 0)
-  {
-    freeSSL ();
-    return -1;
-  }
+    {
+      freeSSL ();
+      return -1;
+    }
 
-  if (SSL_set_fd (sslConnection,socketHandle) == 0)
-  {
-    shutdown (2);
-    freeSSL ();
-    close ();
-    return -1;
-  }
+  if (SSL_set_fd (sslConnection, socketHandle) == 0)
+    {
+      shutdown (2);
+      freeSSL ();
+      return -1;
+    }
 
   do
-  {
-    sslAccept = SSL_accept (sslConnection);
-  }while (sslAccept != 1 &&
-          SSL_get_error (sslConnection, sslAccept) == SSL_ERROR_WANT_READ);
+    {
+      sslAccept = SSL_accept (sslConnection);
+    }while (sslAccept != 1
+            && SSL_get_error (sslConnection, sslAccept) == SSL_ERROR_WANT_READ);
 
   if (sslAccept != 1 )
-  {
-    shutdown (2);
-    freeSSL ();
-    close ();
-    return -1;
-  }
+    {
+      shutdown (2);
+      freeSSL ();
+      return -1;
+    }
 
   clientCert = SSL_get_peer_certificate (sslConnection);
 
@@ -245,27 +246,27 @@ int SslSocket::recv (char* buffer, int len, int flags)
   int err = 0;
 
   if (sslConnection)
-  {
-    for (;;)
     {
-      int sslError;
-      err = SSL_read (sslConnection, buffer, len);
+      for (;;)
+        {
+          int sslError;
+          err = SSL_read (sslConnection, buffer, len);
 
-      if (err > 0)
-        break;
+          if (err > 0)
+            break;
 
-      sslError = SSL_get_error (sslConnection, err);
+          sslError = SSL_get_error (sslConnection, err);
 
-      if ((sslError != SSL_ERROR_WANT_READ) &&
-          (sslError != SSL_ERROR_WANT_WRITE))
-        break;
-    }
+          if ((sslError != SSL_ERROR_WANT_READ) &&
+              (sslError != SSL_ERROR_WANT_WRITE))
+            break;
+        }
 
-    if (err <= 0)
-      return -1;
-    else
-      return err;
-  }
+      if (err <= 0)
+        return -1;
+      else
+        return err;
+    }
 
   return 0;
 }
diff --git a/myserver/src/base/socket_pair/socket_pair.cpp b/myserver/src/base/socket_pair/socket_pair.cpp
index ec26eff..7ed8f29 100644
--- a/myserver/src/base/socket_pair/socket_pair.cpp
+++ b/myserver/src/base/socket_pair/socket_pair.cpp
@@ -60,18 +60,8 @@ SocketPair::SocketPair ()
  */
 int SocketPair::create ()
 {
-#ifdef WIN32
-# define LOCAL_SOCKETPAIR_AF AF_INET
-#else
-# define LOCAL_SOCKETPAIR_AF AF_UNIX
-#endif
-
-  int af = LOCAL_SOCKETPAIR_AF;
-  int type = SOCK_STREAM;
-  int protocol = 0;
-
 #ifndef WIN32
-  int ret = socketpair (af, type, protocol, (int*)handles);
+  int ret = socketpair (AF_UNIX, SOCK_STREAM, 0, (int*) handles);
   if (ret == 0)
     socketHandle = handles[0];
 
@@ -86,10 +76,10 @@ int SocketPair::create ()
   if (handles == 0)
     return -1;
 
-  handles[0] = handles[1] = INVALID_SOCKET;
-  listener = socket (AF_INET, type, 0);
+  handles[0] = handles[1] = -1;
+  listener = ::socket (AF_INET, SOCK_STREAM, 0);
 
-  if (listener == INVALID_SOCKET)
+  if (listener < 0)
     return -1;
 
   memset (&addr, 0, sizeof (addr));
@@ -97,41 +87,46 @@ int SocketPair::create ()
   addr.sin_addr.s_addr = htonl (0x7f000001);
   addr.sin_port = 0;
 
-  e = ::bind (listener, (struct sockaddr*) &addr, sizeof (addr));
-  if (e == SOCKET_ERROR)
+  if (::bind (listener, (struct sockaddr*) &addr, sizeof (addr)) < 0)
     {
-      closesocket (listener);
+      ::close (listener);
       return -1;
     }
 
-  e = ::getsockname (listener, (struct sockaddr*) &addr, &addrlen);
-  if (e == SOCKET_ERROR)
+  if (::getsockname (listener, (struct sockaddr*) &addr, &addrlen) < 0)
     {
-      closesocket (listener);
+      ::close (listener);
       return -1;
     }
 
   do
     {
-      if (::listen (listener, 1) == SOCKET_ERROR)
+      if (::listen (listener, 1) < 0)
         break;
-      if ((handles[0] = ::socket (AF_INET, type, 0)) == INVALID_SOCKET)
+
+      if ((handles[0] = ::socket (AF_INET, SOCK_STREAM, 0)) < 0)
         break;
-      if (::connect (handles[0], (struct sockaddr*) &addr, sizeof (addr))
-          == SOCKET_ERROR)
+
+      if (::connect (handles[0], (struct sockaddr*) &addr, sizeof (addr)) < 0)
         break;
-      if ((handles[1] = ::accept (listener, NULL, NULL)) == INVALID_SOCKET)
+
+      if ((handles[1] = ::accept (listener, NULL, NULL)) < 0)
         break;
 
       socketHandle = handles[0];
 
-      closesocket (listener);
+      ::close (listener);
       return 0;
     } while (0);
 
-  closesocket (listener);
-  closesocket (handles[0]);
-  closesocket (handles[1]);
+  ::close (listener);
+
+  if (handles[0] != -1)
+    ::close (handles[0]);
+
+
+  if (handles[1] != -1)
+    ::close (handles[1]);
 
   return -1;
 #endif
diff --git a/myserver/src/base/utility.cpp b/myserver/src/base/utility.cpp
index 38ed19d..a235e3d 100644
--- a/myserver/src/base/utility.cpp
+++ b/myserver/src/base/utility.cpp
@@ -100,7 +100,6 @@ int freecwd ()
   if (!currentPath)
     return 0;
 
-  delete [] currentPath;
   currentPathLen = 0;
   return 0;
 }
@@ -124,15 +123,15 @@ int getdefaultwdlen ()
 char *getdefaultwd (char *path, int len)
 {
   if (!currentPath && initializeCwd ())
-      return NULL;
+    return NULL;
 
   if (path)
     {
       /* If len is equal to zero we assume no limit.  */
       if (len)
-	myserver_strlcpy (path, currentPath, len);
+        myserver_strlcpy (path, currentPath, len);
       else
-	strcpy (path, currentPath);
+        strcpy (path, currentPath);
     }
 
   return currentPath;
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index f374663..aeed1fd 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -22,7 +22,8 @@
 
 static DEFINE_THREAD (dispatcher, p)
 {
-  ConnectionsScheduler::DispatcherArg *da = (ConnectionsScheduler::DispatcherArg*)p;
+  ConnectionsScheduler::DispatcherArg *da
+    = (ConnectionsScheduler::DispatcherArg*) p;
 
   if (da == NULL)
     return NULL;
diff --git a/myserver/src/log/stream/socket_stream_creator.cpp b/myserver/src/log/stream/socket_stream_creator.cpp
index 5ceac6e..51318f3 100644
--- a/myserver/src/log/stream/socket_stream_creator.cpp
+++ b/myserver/src/log/stream/socket_stream_creator.cpp
@@ -25,20 +25,22 @@ SocketStreamCreator::create (FiltersFactory* ff, string location,
   Socket* out = new Socket ();
   string host = getHost (location);
   u_short port = getPort (location);
+
+  if (out->socket (AF_INET, SOCK_STREAM, 0) < 0)
+    return NULL;
+
   if (out && !out->connect (host.c_str (), port))
     {
       u_long nbw;
       FiltersChain* fc = ff->chain (filters, out, &nbw);
       if (fc)
-        {
-          return new SocketStream (ff, cycle, out, fc);
-        }
+        return new SocketStream (ff, cycle, out, fc);
     }
+
   if (out)
-    {
-      delete out;
-    }
-  return 0;
+    delete out;
+
+  return NULL;
 }
 
 u_short
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 7128436..700e39c 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -93,15 +93,13 @@ static DEFINE_THREAD (testSslRecvClient, pParam);
 
 class TestSslSocket : public CppUnit::TestFixture
 {
-  CPPUNIT_TEST_SUITE ( TestSslSocket );
-
-  CPPUNIT_TEST ( testRecv );
-
-  CPPUNIT_TEST_SUITE_END ( );
+  CPPUNIT_TEST_SUITE (TestSslSocket);
+  CPPUNIT_TEST (testRecv);
+  CPPUNIT_TEST_SUITE_END ();
 
 public:
 
-  void setUp ( )
+  void setUp ()
   {
     initializeSSL ();
     u_long nbw;
@@ -116,13 +114,13 @@ public:
     f.close ();
   }
 
-  void tearDown ( )
+  void tearDown ()
   {
     FilesUtility::deleteFile (TESTSERVERPEM);
     FilesUtility::deleteFile (TESTSERVERKEY);
   }
 
-  void testRecv ( )
+  void testRecv ()
   {
     Socket *obj = new Socket;
     SslSocket *sslObj = NULL;
@@ -136,84 +134,83 @@ public:
     int status;
 
     ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
-    ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ( "127.0.0.1" );
-    ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
+    ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
+    ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
 
-    socklen_t sockInLen = sizeof ( sockaddr_in );
+    socklen_t sockInLen = sizeof (sockaddr_in);
 
-    CPPUNIT_ASSERT ( obj->socket ( AF_INET, SOCK_STREAM, 0 ) != -1 );
+    CPPUNIT_ASSERT (obj->socket (AF_INET, SOCK_STREAM, 0) != -1);
 
-    CPPUNIT_ASSERT ( obj->setsockopt ( SOL_SOCKET, SO_REUSEADDR,
+    CPPUNIT_ASSERT (obj->setsockopt (SOL_SOCKET, SO_REUSEADDR,
                                       (const char*) &optvalReuseAddr,
-                                      sizeof (optvalReuseAddr) ) != -1 );
+                                      sizeof (optvalReuseAddr)) != -1);
 
-    ctx = SSL_CTX_new ( SSLv23_server_method () );
+    ctx = SSL_CTX_new (SSLv23_server_method ());
 
-    if ( SSL_CTX_use_certificate_file ( ctx, TESTSERVERPEM, SSL_FILETYPE_PEM ) != 1 )
+    if (SSL_CTX_use_certificate_file (ctx, TESTSERVERPEM, SSL_FILETYPE_PEM) != 1)
     {
-      SSL_CTX_free ( ctx );
+      SSL_CTX_free (ctx);
       CPPUNIT_ASSERT (false);
     }
 
-    if ( SSL_CTX_use_PrivateKey_file ( ctx, TESTSERVERKEY, SSL_FILETYPE_PEM ) != 1 )
+    if (SSL_CTX_use_PrivateKey_file (ctx, TESTSERVERKEY, SSL_FILETYPE_PEM) != 1)
     {
-      SSL_CTX_free ( ctx );
+      SSL_CTX_free (ctx);
       CPPUNIT_ASSERT (false);
     }
 
-    // If the port is used by another program, try a few others.
+    /* If the port is used by another program, try a few others.  */
     do
-    {
-      port++;
-      ((sockaddr_in*) (&sockIn))->sin_port = htons ( port);
-    }
+      {
+        port++;
+        ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
+      }
     while ((status = obj->bind (&sockIn, sockInLen)) != 0 && port < 28000);
 
-    CPPUNIT_ASSERT ( status != -1 );
+    CPPUNIT_ASSERT (status != -1);
 
-    CPPUNIT_ASSERT ( obj->listen ( 1 ) != -1 );
+    CPPUNIT_ASSERT (obj->listen (1) != -1);
 
-    CPPUNIT_ASSERT_EQUAL ( Thread::create ( &tid, testSslRecvClient, &port ), 0 );
-    Socket s = obj->accept ( &sockIn, &sockInLen );
-    sslObj = new SslSocket (&s);
+    CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testSslRecvClient, &port), 0);
+    Socket s = obj->accept (&sockIn, &sockInLen);
 
-    sslObj->setSSLContext ( ctx );
+    sslObj = new SslSocket (&s);
+    sslObj->setSSLContext (ctx);
 
-    int ret = sslObj->sslAccept ( );
+    int ret = sslObj->sslAccept ();
 
-    if ( ret < 0 )
+    if (ret < 0)
     {
       delete obj;
       delete sslObj;
-      SSL_CTX_free ( ctx );
+      SSL_CTX_free (ctx);
       CPPUNIT_ASSERT (false);
     }
 
     char buf[32] = {0};
 
-    ret = sslObj->recv ( buf, sizeof (buf), 0 );
+    ret = sslObj->recv (buf, sizeof (buf), 0);
 
-    sslObj->send ( "a", 1, 0);
+    sslObj->send ("a", 1, 0);
 
-    CPPUNIT_ASSERT (ret != -1 );
+    CPPUNIT_ASSERT (ret != -1);
 
-    CPPUNIT_ASSERT ( sslObj->close ( ) != -1 );
+    CPPUNIT_ASSERT (sslObj->close () != -1);
 
-    CPPUNIT_ASSERT ( obj->close ( ) != -1 );
+    CPPUNIT_ASSERT (obj->close () != -1);
 
-    SSL_CTX_free ( ctx );
+    SSL_CTX_free (ctx);
 
     delete obj;
     delete sslObj;
   }
 };
 
-CPPUNIT_TEST_SUITE_REGISTRATION ( TestSslSocket );
+CPPUNIT_TEST_SUITE_REGISTRATION (TestSslSocket);
 
 static DEFINE_THREAD (testSslRecvClient, pParam)
 {
-  Socket *obj2 = new Socket;
-  SslSocket *sslObj2 = NULL;
+  SslSocket *sslClient = NULL;
   int optvalReuseAddr = 1;
   char host[] = "localhost";
   int port = *((int*)pParam);
@@ -221,29 +218,24 @@ static DEFINE_THREAD (testSslRecvClient, pParam)
   MYSERVER_SOCKADDRIN sockIn = { 0 };
 
   ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
-  ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ( "127.0.0.1" );
-  ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
+  ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
+  ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
 
-  int sockInLen = sizeof ( struct sockaddr_in );
+  int sockInLen = sizeof (struct sockaddr_in);
 
-  CPPUNIT_ASSERT ( obj2->socket ( AF_INET, SOCK_STREAM, 0 ) != -1 );
+  sslClient = new SslSocket ();
 
-  sslObj2 = new SslSocket ( obj2 );
+  CPPUNIT_ASSERT (sslClient->socket (AF_INET, SOCK_STREAM, 0) != -1);
 
-  CPPUNIT_ASSERT ( sslObj2->connect ( &sockIn, sockInLen ) != -1 );
+  CPPUNIT_ASSERT (sslClient->connect (&sockIn, sockInLen) != -1);
 
   char buf[] = "Works?\n";
 
-  int ret = sslObj2->send ( buf, strlen (buf), 0 );
-
-  sslObj2->recv ( buf, 1, 0 );
-
-  CPPUNIT_ASSERT (ret != -1 );
-
-
-  CPPUNIT_ASSERT ( sslObj2->close ( ) != -1 );
+  int ret = sslClient->send (buf, strlen (buf), 0);
+  sslClient->recv (buf, 1, 0);
 
-  delete obj2;
-  delete sslObj2;
+  CPPUNIT_ASSERT (ret != -1);
+  CPPUNIT_ASSERT (sslClient->close () != -1);
+  delete sslClient;
   return 0;
 }



commit 5e694f2c1922d5ffd5b165bd6dbabb3223c45c29
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 8 01:25:29 2010 +0100

    Use gnulib ioctl module

diff --git a/myserver/bootstrap.conf b/myserver/bootstrap.conf
index f4aefb8..9741cc5 100644
--- a/myserver/bootstrap.conf
+++ b/myserver/bootstrap.conf
@@ -35,6 +35,7 @@ gethostname
 getsockname
 gettext
 gettimeofday
+ioctl
 listen
 malloc
 mktime



commit 85b5a3a815bd84e1f4007bbac907d7704bffe69d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 7 22:14:54 2010 +0100

    Show tests progress when executed in text mode

diff --git a/myserver/tests/main.cpp b/myserver/tests/main.cpp
index 8271ad5..cf9d930 100644
--- a/myserver/tests/main.cpp
+++ b/myserver/tests/main.cpp
@@ -27,6 +27,9 @@
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/BriefTestProgressListener.h>
+#include <cppunit/TestResult.h>
+#include <cppunit/TestResultCollector.h>
 
 #include <fstream>
 #include <string.h>
@@ -40,6 +43,7 @@ int main (int argc, char* argv[])
   bool xml = argc > 1 && !strcmp (argv[1], "xml");
   bool compiler = argc > 1 && !strcmp (argv[1], "compiler");
   char *filename = argc > 2 ? argv[2] : NULL;
+  CppUnit::BriefTestProgressListener progress;
 
   program_name = argv[0];
 
@@ -59,16 +63,19 @@ int main (int argc, char* argv[])
   CppUnit::Outputter * out;
   CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry ().makeTest ();
   CppUnit::TextUi::TestRunner runner;
-  runner.addTest ( suite );
+  runner.addTest (suite);
 
   if (xml)
-    out = new CppUnit::XmlOutputter ( &runner.result (), *str );
+    out = new CppUnit::XmlOutputter (&runner.result (), *str);
   else if (compiler)
-    out = new CppUnit::CompilerOutputter ( &runner.result (), *str );
+    out = new CppUnit::CompilerOutputter (&runner.result (), *str);
   else
-    out = new CppUnit::TextOutputter ( &runner.result (), *str );
+    {
+      out = new CppUnit::TextOutputter (&runner.result (), *str);
+      runner.eventManager ().addListener (&progress);
+    }
 
-  runner.setOutputter ( out );
+  runner.setOutputter (out);
 
   int ret = runner.run () ? 0 : 1;
 



commit 09b658b28fa860acd80fed886efa59a1d6ab4bec
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 7 18:15:02 2010 +0100

    Move inclusion of myserver headers before undef open/close

diff --git a/myserver/tests/main.cpp b/myserver/tests/main.cpp
index 9af9d6e..8271ad5 100644
--- a/myserver/tests/main.cpp
+++ b/myserver/tests/main.cpp
@@ -16,6 +16,7 @@
  */
 
 #include "myserver.h"
+#include <include/server/server.h>
 
 #undef open
 #undef close
@@ -30,8 +31,6 @@
 #include <fstream>
 #include <string.h>
 
-#include <include/server/server.h>
-
 using namespace std;
 
 const char *program_name = NULL;
@@ -74,7 +73,7 @@ int main (int argc, char* argv[])
   int ret = runner.run () ? 0 : 1;
 
   if (filename)
-      ofile.close ();
+    ofile.close ();
 
   return ret;
 }



commit b4a3446ea120b33a3286ee4cf0a24175d4fa69a6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 7 14:22:22 2010 +0100

    Add a delay after the writer thread creation

diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index 5d1ef2f..cd15885 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -112,6 +112,8 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testRecvClient, &port), 0);
 
+    Thread::wait (MYSERVER_SEC (1));
+
     CPPUNIT_ASSERT (obj->dataOnRead (5));
 
     Socket s = obj->accept (&sockIn, &sockInLen);



commit ab7dfdd846bd2f82c2251b0355c1e101b1e5cda0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 7 14:21:24 2010 +0100

    Specify a WINVER recent enough to support getaddrinfo.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 8f9c189..60135dd 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -46,6 +46,8 @@ AC_PROG_YACC
 AC_C_BIGENDIAN
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
+
+AC_DEFINE([WINVER], [0x0501], [WINVER])
 AC_LIBTOOL_WIN32_DLL
 
 AC_CANONICAL_HOST



commit 5ba9ccf2685c25144ccb075cf5db5d9ddac22e86
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 7 14:16:34 2010 +0100

    Ensure to create the server class instance

diff --git a/myserver/tests/main.cpp b/myserver/tests/main.cpp
index 4e70269..9af9d6e 100644
--- a/myserver/tests/main.cpp
+++ b/myserver/tests/main.cpp
@@ -54,6 +54,7 @@ int main (int argc, char* argv[])
       str = &ofile;
     }
 
+  Server::createInstance ();
   Server::getInstance ()->loadLibraries ();
 
   CppUnit::Outputter * out;



commit 230c8f864bed5aa1319632792115fa94813668d1
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 7 01:06:31 2010 +0100

    Use new/free instead of calloc.

diff --git a/myserver/src/base/base64/mime_utils.cpp b/myserver/src/base/base64/mime_utils.cpp
index 6dbce24..aec95e9 100644
--- a/myserver/src/base/base64/mime_utils.cpp
+++ b/myserver/src/base/base64/mime_utils.cpp
@@ -393,7 +393,7 @@ char* CBase64Utils::encode (const char *input, int bufsize)
 char* CBase64Utils::decode (const char *input, int *bufsize)
 {
   int std = 0, count = 1, resultlen = 0;
-  char *finalresult = (char*)calloc (*bufsize + sizeof (char), sizeof (char));
+  char *finalresult = new char[*bufsize + sizeof (char)];
 
   const char *s = input;
   char *result = finalresult;
@@ -472,8 +472,7 @@ CQPUtils::~CQPUtils ()
 char* CQPUtils::decode (char *input)
 {
   char *s = input;
-  char *finalresult = (char*)calloc (strlen (input) + sizeof (char),
-                                    sizeof (char));
+  char *finalresult = new char [strlen (input) + sizeof (char)];
   char *result = finalresult;
   while (*s != '\0')
   {
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 844c3d2..3ef0d38 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -752,7 +752,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
       password[i] = '\0';
       connection->setLogin (login);
       connection->setPassword (password);
-      delete decodedPwBuf;
+      delete [] decodedPwBuf;
 
       *lenOut = tokenOff = getEndLine (token, 100);
       if (tokenOff == -1)



commit b519d1e92574ff12ea1eb3ed5ccdd27acda2a352
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 6 21:29:45 2010 +0100

    The two branches are identical, remove one.

diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index f7d9dff..e06341c 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -258,11 +258,7 @@ MYSERVER_HOSTENT *Socket::gethostbyname (const char *hostname)
  */
 int Socket::shutdown (int how)
 {
-#ifdef WIN32
-  return ::shutdown (socketHandle, how);
-#else
   return ::shutdown (socketHandle, how);
-#endif
 }
 
 /*!



commit c4888d7dda42af77c121ac44c0e33cdd77607ed9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 6 20:00:06 2010 +0100

    Pipe::inverted duplicates used handles.

diff --git a/myserver/src/base/pipe/pipe.cpp b/myserver/src/base/pipe/pipe.cpp
index 9bb82cf..bb3b5bb 100644
--- a/myserver/src/base/pipe/pipe.cpp
+++ b/myserver/src/base/pipe/pipe.cpp
@@ -209,19 +209,48 @@ int Pipe::close ()
   return 0;
 }
 
+class PipeException : public exception
+{
+public:
+  virtual const char *what () const throw ()
+  {
+    return message;
+  }
+
+  PipeException (string & str)
+  {
+    this->message = str.c_str ();
+  }
+
+private:
+  const char *message;
+};
+
 /*!
  * Invert the current pipe on another instance of the class.
- * The input will be used as output and viceversa.
+ * The input stream will be used as output and viceversa.
  * \param pipe The pipe where write.
  */
 void Pipe::inverted (Pipe& pipe)
 {
 #ifndef WIN32
-  handles[0] = pipe.handles[1];
-  handles[1] = pipe.handles[0];
+  pipe.handles[0] = dup (handles[1]);
+  pipe.handles[1] = dup (handles[0]);
+  if (pipe.handles[0] < 0 || pipe.handles[1] < 0)
+    {
+      string err (_("Internal error"));
+      throw PipeException (err);
+    }
 #else
-  pipe.readHandle = writeHandle;
-  pipe.writeHandle = readHandle;
+  if ((! DuplicateHandle (GetCurrentProcess(), writeHandle, GetCurrentProcess(),
+                          &pipe.readHandle, 0, FALSE, DUPLICATE_SAME_ACCESS))
+      || (! DuplicateHandle (GetCurrentProcess(), readHandle,
+                             GetCurrentProcess(), &pipe.writeHandle, 0, FALSE,
+                             DUPLICATE_SAME_ACCESS)))
+    {
+      string err (_("Internal error"));
+      throw PipeException (err);
+    }
 #endif
 }
 
diff --git a/myserver/tests/test_pipe.cpp b/myserver/tests/test_pipe.cpp
index f465df6..304ca3e 100644
--- a/myserver/tests/test_pipe.cpp
+++ b/myserver/tests/test_pipe.cpp
@@ -117,8 +117,8 @@ public:
 
     pipe->inverted (pipeInv);
 
-    CPPUNIT_ASSERT_EQUAL (pipeInv.getReadHandle (), pipe->getWriteHandle ());
-    CPPUNIT_ASSERT_EQUAL (pipe->getReadHandle (), pipeInv.getWriteHandle ());
+    CPPUNIT_ASSERT (pipeInv.getReadHandle () != pipe->getReadHandle ());
+    CPPUNIT_ASSERT (pipeInv.getWriteHandle () != pipe->getWriteHandle ());
 
     pipe->close ();
 



commit 186671520aa491cd2c15baeee041f72924c01cd7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 6 18:49:32 2010 +0100

    Change type of the `host' variable to string.

diff --git a/myserver/src/log/stream/socket_stream_creator.cpp b/myserver/src/log/stream/socket_stream_creator.cpp
index d7a019b..5ceac6e 100644
--- a/myserver/src/log/stream/socket_stream_creator.cpp
+++ b/myserver/src/log/stream/socket_stream_creator.cpp
@@ -23,9 +23,9 @@ SocketStreamCreator::create (FiltersFactory* ff, string location,
                              list<string>& filters, u_long cycle)
 {
   Socket* out = new Socket ();
-  char const* host = getHost (location).c_str ();
+  string host = getHost (location);
   u_short port = getPort (location);
-  if (out && !out->connect (host, port))
+  if (out && !out->connect (host.c_str (), port))
     {
       u_long nbw;
       FiltersChain* fc = ff->chain (filters, out, &nbw);



commit 45e2728b407644b8e1e11dd39c7a702a7594d6b2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 6 18:41:52 2010 +0100

    Use AC_LIBTOOL_WIN32_DLL

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 5300208..8f9c189 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -2,7 +2,7 @@ dnl GNU MySever configuration script
 dnl
 dnl GNU MyServer
 dnl
-dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2010 Free Software Foundation, Inc.
 dnl This program is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
@@ -46,6 +46,7 @@ AC_PROG_YACC
 AC_C_BIGENDIAN
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
+AC_LIBTOOL_WIN32_DLL
 
 AC_CANONICAL_HOST
 



commit cebcda83a6dc078a4df2c78f0c288ebe79792832
Merge: 242eaf7 0729c23
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 6 01:45:59 2010 +0100

    Merge branch 'master' of file:///home/gscrivano/myserver/myserver




commit 242eaf7bfe64bfdd3542d594f15a558b88dc256d
Merge: dfa646f 9271f7e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 5 23:14:19 2010 +0100

    Merge branch 'master' of file:///home/gscrivano/myserver/myserver




commit dfa646f8a4824e220a2ed2a3122445d374d1619f
Merge: ec94614 80fe8da
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 3 21:03:53 2010 +0100

    Merge branch 'master' of file:///home/gscrivano/myserver/myserver




commit ec946148004db983a871fb4d27ca4ac0071257fb
Merge: d1cd168 32f225f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 18 19:07:40 2009 +0100

    Merge branch 'master' of file:///home/gscrivano/myserver/myserver




commit d1cd168cd5c1ba67d472fdacdbf59df00a175d5f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 17 20:23:39 2009 +0100

    Http header parser avoids to copy more bytes than needed.

diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index d5e5dac..642e595 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -523,14 +523,14 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
            * If the version is not specified or it is too long store
            * some information for logging then return an invalid header value.
            */
-          if ((!j) || ( (i-j) == HTTP_REQUEST_VER_DIM ))
+          if (!j || ((i-j) == HTTP_REQUEST_VER_DIM))
             {
               request->ver.clear ();
               request->cmd.clear ();
               tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
               if (tokenOff > 0)
-                request->uri.assign (input,
-                                     min (HTTP_REQUEST_URI_DIM, tokenOff));
+                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM,
+                                                 tokenOff));
               else
                 request->uri.assign (input, HTTP_REQUEST_URI_DIM );
               return 400;
@@ -547,14 +547,14 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           request->uri=trimRight (request->uri, " /");
           request->uriOpts=trim (request->uriOpts, " ");
         }
-      else if (!strcmpi (command,"Authorization"))
+      else if (!strcmpi (command, "Authorization"))
         {
           int ret = readReqAuthLine (request, connection, token, &tokenOff);
           if (ret)
             return ret;
           lineControlled = 1;
         }
-      else if (!strcmpi (command, (char*)"Content-length"))
+      else if (!strcmpi (command, "Content-length"))
         {
           tokenOff = getEndLine (token, HTTP_REQUEST_CONTENT_LENGTH_DIM);
           if (tokenOff == -1)
@@ -562,7 +562,7 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           lineControlled = 1;
           request->contentLength.assign (token,tokenOff);
         }
-      else if (!strcmpi (command, (char*)"Range"))
+      else if (!strcmpi (command, "Range"))
         {
           int ret = readReqRangeLine (request, connection, token, &tokenOff);
           if (ret)
@@ -588,13 +588,11 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           else
             {
               HttpRequestHeader::Entry *e = new HttpRequestHeader::Entry ();
-              if (e)
-                {
-                  e->name->assign (command, HTTP_RESPONSE_OTHER_DIM);
-                  e->value->assign (token,
-                               std::min (HTTP_RESPONSE_OTHER_DIM, tokenOff));
-                  request->other.put (cmdStr, e);
-                }
+              e->name->assign (command, std::min (HTTP_RESPONSE_OTHER_DIM,
+                                                  tokenOff));
+              e->value->assign (token, std::min (HTTP_RESPONSE_OTHER_DIM,
+                                                 tokenOff));
+              request->other.put (cmdStr, e);
             }
         }
       token += tokenOff + 2;



commit 3dec625c9f5f81c04921338dc90f235ab1513cca
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 17 20:11:54 2009 +0100

    Under Windows configuration files can be only in the current directory.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index d044359..e9b138f 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -264,6 +264,7 @@ int loadConfFileLocation (string &outFile, string fileName, const char *dir)
 
 #ifdef WIN32
       outFile = fileName;
+      return FilesUtility::fileExists (fileName) ? 0 : -1;
 #else
 
       if (dir)



commit 6e98f3e19361364be62c98196e1de5b84455cc96
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 16 22:26:53 2009 +0100

    Fix a compiling issue under Windows.

diff --git a/myserver/tests/test_membuf_file.cpp b/myserver/tests/test_membuf_file.cpp
index 922b721..a114847 100644
--- a/myserver/tests/test_membuf_file.cpp
+++ b/myserver/tests/test_membuf_file.cpp
@@ -64,9 +64,9 @@ public:
   void testHandle ()
   {
     Handle handle = (Handle) 1;
-    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), (Handle)-1);
     CPPUNIT_ASSERT_EQUAL (tfile->setHandle (handle), -1);
-    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), (Handle)-1);
   }
 
   void testCreateTemporaryMembufFile ()

-----------------------------------------------------------------------

Summary of changes:
 myserver/bootstrap.conf                            |    1 +
 myserver/configure.ac                              |    5 +-
 myserver/include/base/socket/socket.h              |    4 -
 myserver/include/base/socket/ssl_socket.h          |   14 +--
 myserver/src/base/base64/mime_utils.cpp            |    5 +-
 myserver/src/base/pipe/pipe.cpp                    |   39 ++++-
 myserver/src/base/socket/socket.cpp                |  130 ++++----------
 myserver/src/base/socket/ssl_socket.cpp            |  193 ++++++++++----------
 myserver/src/base/socket_pair/socket_pair.cpp      |   53 +++---
 myserver/src/base/utility.cpp                      |    7 +-
 .../connections_scheduler.cpp                      |    3 +-
 myserver/src/log/stream/socket_stream_creator.cpp  |   20 +-
 myserver/src/protocol/http/http_headers.cpp        |    2 +-
 myserver/tests/main.cpp                            |   23 ++-
 myserver/tests/test_pipe.cpp                       |    4 +-
 myserver/tests/test_socket.cpp                     |    2 +
 myserver/tests/test_ssl_socket.cpp                 |  108 +++++------
 17 files changed, 283 insertions(+), 330 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 09 19:00:01 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nezzt-000242-Ln
	for mharc-myserver-commit@gnu.org; Tue, 09 Feb 2010 19:00:01 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nezzs-00023t-VU
	for myserver-commit@gnu.org; Tue, 09 Feb 2010 19:00:00 -0500
Received: from [199.232.76.173] (port=36676 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nezzr-00023Z-Lu
	for myserver-commit@gnu.org; Tue, 09 Feb 2010 18:59:59 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1Nezzn-0000A3-Mj
	for myserver-commit@gnu.org; Tue, 09 Feb 2010 18:59:59 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:49552
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Nezzn-00009z-Ag
	for myserver-commit@gnu.org; Tue, 09 Feb 2010 18:59:55 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nezzm-0007yM-Ru
	for myserver-commit@gnu.org; Tue, 09 Feb 2010 23:59:54 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nezzm-0005EW-Bb
	for myserver-commit@gnu.org; Tue, 09 Feb 2010 23:59:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ae0ca1765d0a274fc25ceae00c15893ee15421db
X-Git-Newrev: 43a210fc80d47a4dd91d60963851009af14ce686
Message-Id: <E1Nezzm-0005EW-Bb@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 09 Feb 2010 23:59:54 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-43-g43a210f
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Feb 2010 00:00:01 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  43a210fc80d47a4dd91d60963851009af14ce686 (commit)
      from  ae0ca1765d0a274fc25ceae00c15893ee15421db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 43a210fc80d47a4dd91d60963851009af14ce686
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 01:00:19 2010 +0100

    Remove legacy code for files handling. Use new gnulib modules.

diff --git a/myserver/bootstrap.conf b/myserver/bootstrap.conf
index 9741cc5..02a2797 100644
--- a/myserver/bootstrap.conf
+++ b/myserver/bootstrap.conf
@@ -27,9 +27,11 @@ accept
 argp
 bind
 chdir-long
+close
 crypto/md5
 crypto/sha1
 connect
+fsync
 getcwd
 gethostname
 getsockname
@@ -40,9 +42,14 @@ listen
 malloc
 mktime
 nproc
+open
 pipe
+read-file
+readlink
 recv
 regex
+remove
+rename
 select
 send
 setsockopt
@@ -51,6 +58,7 @@ snprintf
 socket
 sysexits
 unlink
+write
 "
 
 gnulib_extra_files="
diff --git a/myserver/include/base/hash_map/hash_map.h b/myserver/include/base/hash_map/hash_map.h
index ddecd19..cac8a13 100644
--- a/myserver/include/base/hash_map/hash_map.h
+++ b/myserver/include/base/hash_map/hash_map.h
@@ -30,6 +30,8 @@
 # include <vector>
 # include <string>
 
+# undef remove
+
 using namespace std;
 
 //hashmap Hash-Key-Value Struct
diff --git a/myserver/include/connections_scheduler/connections_scheduler.h b/myserver/include/connections_scheduler/connections_scheduler.h
index fb900cd..6e79569 100644
--- a/myserver/include/connections_scheduler/connections_scheduler.h
+++ b/myserver/include/connections_scheduler/connections_scheduler.h
@@ -29,6 +29,8 @@
 # include <include/base/thread/thread.h>
 # include <include/base/socket_pair/socket_pair.h>
 
+# undef remove
+
 # include <list>
 # include <queue>
 
diff --git a/myserver/include/filter/stream.h b/myserver/include/filter/stream.h
index 3c03800..e56289c 100644
--- a/myserver/include/filter/stream.h
+++ b/myserver/include/filter/stream.h
@@ -28,11 +28,7 @@ typedef u_int Handle;
 typedef int Handle;
 # endif
 
-# ifdef WIN32
-typedef HANDLE FileHandle;
-# else
 typedef int FileHandle;
-# endif
 
 /*!
  *Abstract class to handle virtual data streams.
diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index a66f807..99cca17 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -34,6 +34,8 @@
 
 using namespace std;
 
+# undef remove
+
 class LogManager
 {
 public:
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 3af69b1..53a62ee 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -22,34 +22,30 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/string/stringutils.h>
 #include <include/base/file/files_utility.h>
 
-#ifndef WIN32
 extern "C"
 {
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <errno.h>
-# include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <time.h>
+
+#ifdef SENDFILE
 # include <fcntl.h>
 # include <stdlib.h>
-# include <string.h>
-# include <math.h>
-# include <time.h>
-
-# ifdef SENDFILE
-#  include <fcntl.h>
-#  include <stdlib.h>
-#  include <stdio.h>
-#  include <sys/sendfile.h>
-#  include <sys/stat.h>
-#  include <sys/types.h>
-#  include <unistd.h>
-# endif
-
-
-}
+# include <stdio.h>
+# include <sys/sendfile.h>
+# include <sys/stat.h>
+# include <sys/types.h>
+# include <unistd.h>
 #endif
+}
 
 #include <string>
 #include <sstream>
@@ -100,13 +96,9 @@ int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
     *nbw = 0;
     return 1;
   }
-#ifdef WIN32
-  int ret = WriteFile (handle, buffer, buffersize, nbw, NULL);
-  return (!ret);
-#else
-  *nbw =  ::write (handle, buffer, buffersize);
+
+  *nbw = ::write (handle, buffer, buffersize);
   return (*nbw == buffersize) ? 0 : 1 ;
-#endif
 }
 
 /*!
@@ -115,7 +107,7 @@ int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
  *\param opt Specify how open the file.
  */
 File::File (char *nfilename, int opt)
-  : handle ((FileHandle)-1)
+  : handle ((FileHandle) -1)
 {
   openFile (nfilename, opt);
 }
@@ -126,18 +118,11 @@ File::File (char *nfilename, int opt)
  */
 int File::truncate (u_long size)
 {
-#ifdef WIN32
-  if (seek (size))
-    return 1;
-
-  return !SetEndOfFile (handle);
-#else
   int err = ftruncate (handle, size);
   if (err)
     return err;
 
   return seek (size);
-#endif
 }
 
 /*!
@@ -150,72 +135,12 @@ int File::truncate (u_long size)
 int File::openFile (const char* nfilename,u_long opt)
 {
   long ret = 0;
-
-  filename.assign (nfilename);
-#ifdef WIN32
-  u_long creationFlag = 0;
-  u_long openFlag = 0;
-  u_long attributeFlag = 0;
-  SECURITY_ATTRIBUTES sa = {0};
-  sa.nLength = sizeof (sa);
-
-  if (opt & File::NO_INHERIT)
-    sa.bInheritHandle = FALSE;
-  else
-    sa.bInheritHandle = TRUE;
-
-  sa.lpSecurityDescriptor = NULL;
-
-  if (opt & File::FILE_OPEN_ALWAYS)
-    creationFlag |= OPEN_ALWAYS;
-  if (opt & File::OPEN_IF_EXISTS)
-    creationFlag |= OPEN_EXISTING;
-  if (opt & File::FILE_CREATE_ALWAYS)
-    creationFlag |= CREATE_ALWAYS;
-
-  if (opt & File::READ)
-    openFlag |= GENERIC_READ;
-  if (opt & File::WRITE)
-    openFlag |= GENERIC_WRITE;
-
-  if (opt & File::TEMPORARY)
-  {
-    openFlag |= FILE_ATTRIBUTE_TEMPORARY;
-    attributeFlag |= FILE_FLAG_DELETE_ON_CLOSE;
-  }
-  if (opt & File::HIDDEN)
-    openFlag|= FILE_ATTRIBUTE_HIDDEN;
-
-  if (attributeFlag == 0)
-    attributeFlag = FILE_ATTRIBUTE_NORMAL;
-
-  handle = CreateFile (filename.c_str (), openFlag,
-                       FILE_SHARE_READ|FILE_SHARE_WRITE,
-                       &sa, creationFlag, attributeFlag, NULL);
-
-  if (handle == INVALID_HANDLE_VALUE)
-    {
-      filename.clear ();
-      return 1;
-    }
-  else
-    {
-      if (opt & File::APPEND)
-        ret = seek (getFileSize ());
-      else
-        ret = seek (0);
-
-      if (ret)
-        {
-          close ();
-          filename.clear ();
-          return 1;
-        }
-    }
-#else
   struct stat fStats;
   int flags;
 
+
+  filename.assign (nfilename);
+
   if ((opt & File::READ) && (opt & File::WRITE))
     flags = O_RDWR;
   else if (opt & File::READ)
@@ -244,9 +169,6 @@ int File::openFile (const char* nfilename,u_long opt)
     unlink (filename.c_str ()); /* It will be removed on close.  */
 
   return handle < 0;
-#endif
-
-  return 0;
 }
 
 /*!
@@ -320,18 +242,13 @@ int File::createTemporaryFile (const char* filename)
 int File::close ()
 {
   int ret = 0;
-  if (handle != (FileHandle) -1)
+  if (handle != -1)
     {
-#ifdef WIN32
-      ret = !FlushFileBuffers (handle);
-      ret |= !CloseHandle (handle);
-#else
       ret = fsync (handle);
       ret |= ::close (handle);
-#endif
-  }
+    }
   filename.clear ();
-  handle = (FileHandle) -1;
+  handle = -1;
   return ret;
 }
 
@@ -342,20 +259,12 @@ int File::close ()
 u_long File::getFileSize ()
 {
   u_long ret;
-#ifdef WIN32
-  ret = GetFileSize (handle, NULL);
-  if (ret != INVALID_FILE_SIZE)
-    return ret;
-  else
-    return (u_long)-1;
-#else
   struct stat fStats;
   ret = fstat (handle, &fStats);
   if (ret)
     return (u_long)(-1);
   else
     return fStats.st_size;
-#endif
 }
 
 /*!
@@ -365,13 +274,8 @@ u_long File::getFileSize ()
 int File::seek (u_long initialByte)
 {
   u_long ret;
-#ifdef WIN32
-  ret = SetFilePointer (handle, initialByte, NULL, FILE_BEGIN);
-  return (ret == INVALID_SET_FILE_POINTER) ? 1 : 0;
-#else
   ret = lseek (handle, initialByte, SEEK_SET);
   return (ret != initialByte ) ? 1 : 0;
-#endif
 }
 
 /*!
@@ -381,11 +285,7 @@ int File::seek (u_long initialByte)
  */
 u_long File::getSeek ()
 {
-#ifdef WIN32
-  return SetFilePointer (handle, 0, NULL, FILE_CURRENT);
-#else
   return lseek (handle, 0, SEEK_CUR);
-#endif
 }
 
 /*!
@@ -430,13 +330,9 @@ int File::write (const char* buffer, u_long len, u_long *nbw)
  */
 int File::read (char* buffer, u_long buffersize, u_long* nbr)
 {
-#ifdef WIN32
-  return !ReadFile (handle, buffer, buffersize, nbr, NULL);
-#else
   int ret  = ::read (handle, buffer, buffersize);
   *nbr = (u_long) ret;
   return (ret == -1);
-#endif
 }
 
 /*!
diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index 58c8d67..ca18a92 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -142,11 +142,7 @@ int FilesUtility::getPathRecursionLevel (const char* path)
  */
 int FilesUtility::renameFile (const char* before, const char* after)
 {
-#ifdef WIN32
-  return MoveFile (before, after) ? 0 : 1;
-#else
   return rename (before, after);
-#endif
 }
 
 /*!
@@ -157,9 +153,6 @@ int FilesUtility::renameFile (const char* before, const char* after)
  */
 int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
 {
-#ifdef WIN32
-  return CopyFile (src, dest, overwrite ? FALSE : TRUE) ? 0 : 1;
-#else
   File srcFile;
   File destFile;
   char buffer[4096];
@@ -181,7 +174,6 @@ int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
   destFile.close ();
 
   return ret;
-#endif
 }
 
 /*!
@@ -225,16 +217,11 @@ int FilesUtility::copyFile (File& src, File& dest)
 int FilesUtility::deleteFile (const char *filename)
 {
   int ret;
-#ifdef WIN32
-  ret = DeleteFile (filename);
-  if (ret)
-    return 0;
-#else
   ret = remove (filename);
 
   if (ret && errno == ENOENT)
     ret = 0;
-#endif
+
   return ret;
 }
 
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index aeed1fd..d360185 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -17,6 +17,8 @@
 
 #include "myserver.h"
 
+#undef remove
+
 #include <include/connections_scheduler/connections_scheduler.h>
 #include <include/server/server.h>
 
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index 104a389..e47baf1 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -16,6 +16,9 @@
 */
 
 #include "myserver.h"
+
+#undef remove
+
 #include <include/log/log_manager.h>
 #include <include/server/server.h>
 
diff --git a/myserver/tests/test_hashmap.cpp b/myserver/tests/test_hashmap.cpp
index c21c07e..ee17730 100644
--- a/myserver/tests/test_hashmap.cpp
+++ b/myserver/tests/test_hashmap.cpp
@@ -16,7 +16,11 @@
  */
 
 #include "myserver.h"
+
+#undef remove
+
 #include <include/base/hash_map/hash_map.h>
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
@@ -78,10 +82,8 @@ public:
     CPPUNIT_ASSERT_EQUAL (map->empty (), true);
     map->put ((char*)"key", 0);
     CPPUNIT_ASSERT_EQUAL (map->empty (), false);
-
   }
 
-
   void testPut ()
   {
     map->put ((char*)"one", 1);

-----------------------------------------------------------------------

Summary of changes:
 myserver/bootstrap.conf                            |    8 +
 myserver/include/base/hash_map/hash_map.h          |    2 +
 .../connections_scheduler/connections_scheduler.h  |    2 +
 myserver/include/filter/stream.h                   |    4 -
 myserver/include/log/log_manager.h                 |    2 +
 myserver/src/base/file/file.cpp                    |  160 ++++----------------
 myserver/src/base/file/files_utility.cpp           |   15 +--
 .../connections_scheduler.cpp                      |    2 +
 myserver/src/log/log_manager.cpp                   |    3 +
 myserver/tests/test_hashmap.cpp                    |    6 +-
 10 files changed, 52 insertions(+), 152 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 10 05:14:45 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nf9an-0004jb-KV
	for mharc-myserver-commit@gnu.org; Wed, 10 Feb 2010 05:14:45 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nf9al-0004iq-II
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 05:14:43 -0500
Received: from [199.232.76.173] (port=57170 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nf9ak-0004iT-Vn
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 05:14:43 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1Nf9ae-0000bC-RL
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 05:14:42 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:35898
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Nf9ae-0000b8-9l
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 05:14:36 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nf9ae-0006vY-1s
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 10:14:36 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nf9ad-0003rd-PZ
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 10:14:36 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 43a210fc80d47a4dd91d60963851009af14ce686
X-Git-Newrev: 04bbfafe6dc25628398e64090d1f194acd2ce772
Message-Id: <E1Nf9ad-0003rd-PZ@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 10 Feb 2010 10:14:35 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-49-g04bbfaf
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Feb 2010 10:14:43 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  04bbfafe6dc25628398e64090d1f194acd2ce772 (commit)
       via  5c7466a43cd7f9acb596ee847516b352a56e0100 (commit)
       via  f1818a6b9fdbd109d417c742f5c21fe9485fe4a0 (commit)
       via  5362bb29ea99952336f047b443cb1a15e9c677f4 (commit)
       via  8572121133a4437d8ae1fc1d095dfeb5f2e83ea1 (commit)
       via  8f32cabfed5a7156f75afd2796ad585b59af1832 (commit)
      from  43a210fc80d47a4dd91d60963851009af14ce686 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 04bbfafe6dc25628398e64090d1f194acd2ce772
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 11:01:23 2010 +0100

    Avoid a double cast when checking the error status

diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 53a62ee..83c645c 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -91,14 +91,19 @@ File::~File ()
  */
 int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
 {
+  int ret;
   if (buffersize == 0)
   {
     *nbw = 0;
-    return 1;
+    return -1;
   }
 
-  *nbw = ::write (handle, buffer, buffersize);
-  return (*nbw == buffersize) ? 0 : 1 ;
+  ret = ::write (handle, buffer, buffersize);
+  if (ret < 0)
+    return ret;
+
+  *nbw = static_cast<u_long> (ret);
+  return 0;
 }
 
 /*!
@@ -322,7 +327,7 @@ int File::write (const char* buffer, u_long len, u_long *nbw)
 
 /*!
  *Read data from a file to a buffer.
- *Return 1 on errors.
+ *Return a negative value on errors.
  *Return 0 on success.
  *\param buffer The buffer where write.
  *\param buffersize The length of the buffer in bytes.
@@ -331,8 +336,11 @@ int File::write (const char* buffer, u_long len, u_long *nbw)
 int File::read (char* buffer, u_long buffersize, u_long* nbr)
 {
   int ret  = ::read (handle, buffer, buffersize);
-  *nbr = (u_long) ret;
-  return (ret == -1);
+  if (ret < 0)
+    return ret;
+
+  *nbr = static_cast<u_long> (ret);
+  return 0;
 }
 
 /*!
@@ -374,25 +382,25 @@ int File::fastCopyToSocket (Socket *dest, u_long firstByte, MemBuf *buf, u_long
   char *buffer = buf->getBuffer ();
   u_long size = buf->getRealLength ();
 
-	if (seek (firstByte))
+  if (seek (firstByte))
     return 0;
 
   for (;;)
-  {
-    u_long nbr;
-    u_long tmpNbw;
+    {
+      u_long nbr;
+      u_long tmpNbw;
 
-    if (read (buffer, size, &nbr))
-      return -1;
+      if (read (buffer, size, &nbr))
+        return -1;
 
-    if (nbr == 0)
-      break;
+      if (nbr == 0)
+        break;
 
-    if (dest->write (buffer, nbr, &tmpNbw))
-      return -1;
+      if (dest->write (buffer, nbr, &tmpNbw))
+        return -1;
 
-    *nbw += tmpNbw;
-  }
+      *nbw += tmpNbw;
+    }
 
   return 0;
 #endif
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index 7ed0021..63257cd 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -673,26 +673,28 @@ int Socket::dataOnRead (int sec, int usec)
 
 /*!
  *Inherited from Stream.
- *Return zero on success, or -1 error. Also sets nbr to -1 if error.
+ *Return zero on success, or a negative number on error.
  */
 int Socket::read (char* buffer, u_long len, u_long *nbr)
 {
-  *nbr = static_cast<u_long>(recv (buffer, len, 0));
-  if (*nbr == static_cast<u_long>(-1))
-    return -1;
+  int ret = recv (buffer, len, 0);
+  if (ret < 0)
+    return ret;
 
+  *nbr = static_cast<u_long> (ret);
   return 0;
 }
 
 /*!
  *Inherited from Stream.
- *Return zero on success, or -1 on error. Also sets nbw to -1 if error.
+ *Return zero on success, or a negative number on error.
  */
 int Socket::write (const char* buffer, u_long len, u_long *nbw)
 {
-  *nbw = static_cast<u_long>(send (buffer, len, 0));
-  if ( *nbw == static_cast<u_long>(-1) )
-    return -1;
+  int ret = send (buffer, len, 0);
+  if (ret < 0)
+    return ret;
 
+  *nbw = static_cast<u_long> (ret);
   return 0;
 }
diff --git a/myserver/src/base/unix_socket/unix_socket.cpp b/myserver/src/base/unix_socket/unix_socket.cpp
index b24463a..e16eec5 100644
--- a/myserver/src/base/unix_socket/unix_socket.cpp
+++ b/myserver/src/base/unix_socket/unix_socket.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2009, 2010 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 
@@ -31,9 +31,9 @@ UnixSocket::~UnixSocket ()
 }
 
 /*!
- *Bind the socket to a file.  If the file exists it is removed.
- *\param path Path to the file bound by the socket.
- *\return 0 on success.
+ * Bind the socket to a file.  If the file exists it is removed.
+ * \param path Path to the file bound by the socket.
+ * \return 0 on success.
  */
 int UnixSocket::bind (const char* path)
 {
@@ -44,15 +44,15 @@ int UnixSocket::bind (const char* path)
   makeAddrInfo (&addr, path);
   unlink (path);
 
-  return Socket::bind ((MYSERVER_SOCKADDR*)&addr, sizeof (sockaddr_un));
+  return Socket::bind ((MYSERVER_SOCKADDR*) &addr, sizeof (sockaddr_un));
 #else
   return -1;
 #endif
 }
 
 /*!
- *Shutdown the socket.
- *\return 0 on success.
+ * Shutdown the socket.
+ * \return 0 on success.
  */
 int UnixSocket::shutdown ()
 {
@@ -66,8 +66,8 @@ int UnixSocket::shutdown ()
 
 
 /*!
- *Free the socket.
- *\return 0 on success.
+ * Free the socket.
+ * \return 0 on success.
  */
 int UnixSocket::close ()
 {
@@ -79,8 +79,8 @@ int UnixSocket::close ()
 }
 
 /*!
- *Open the socket.
- *\return the socket handle on success.
+ * Open the socket.
+ * \return the socket handle on success.
  */
 int UnixSocket::socket ()
 {
@@ -92,9 +92,9 @@ int UnixSocket::socket ()
 }
 
 /*!
- *Connect to an Unix socket by its path.
- *\param path Path to the Unix socket.
- *\return 0 on success.
+ * Connect to an Unix socket by its path.
+ * \param path Path to the Unix socket.
+ * \return 0 on success.
  */
 int UnixSocket::connect (const char* path)
 {
@@ -104,32 +104,30 @@ int UnixSocket::connect (const char* path)
 #ifdef AF_UNIX
   makeAddrInfo (&addr, path);
 
-  return Socket::connect ((MYSERVER_SOCKADDR*)&addr, sizeof (addr));
+  return Socket::connect ((MYSERVER_SOCKADDR*) &addr, sizeof (addr));
 #else
   return -1;
 #endif
 }
 
 /*!
- *Accept a new connection.
+ * Accept a new connection.
  */
 Socket* UnixSocket::accept ()
 {
-
 #ifdef AF_UNIX
   sockaddr_un addr;
   socklen_t len = sizeof (addr);
-  return Socket::accept ((MYSERVER_SOCKADDR*)&addr, &len);
+  return Socket::accept ((MYSERVER_SOCKADDR*) &addr, &len);
 #else
-  return new Socket ((SocketHandle)-1);
+  return new Socket (-1);
 #endif
 }
 
-
 /*!
- *Read a file handle on the socket pair.
- *\param fd The file descriptor to read.
- *\return 0 on success.
+ * Read a file handle on the socket pair.
+ * \param fd The file descriptor to read.
+ * \return 0 on success.
  */
 int UnixSocket::readHandle (Handle* fd)
 {
@@ -137,9 +135,9 @@ int UnixSocket::readHandle (Handle* fd)
 }
 
 /*!
- *Transmit a file descriptor on the socket.
- *\param fd The file descriptor to transmit.
- *\return 0 on success.
+ * Transmit a file descriptor on the socket.
+ * \param fd The file descriptor to transmit.
+ * \return 0 on success.
  */
 int UnixSocket::writeHandle (Handle fd)
 {



commit 5c7466a43cd7f9acb596ee847516b352a56e0100
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 10:40:11 2010 +0100

    Fix a name conflict.

diff --git a/myserver/src/base/unix_socket/unix_socket.cpp b/myserver/src/base/unix_socket/unix_socket.cpp
index fdfabb9..b24463a 100644
--- a/myserver/src/base/unix_socket/unix_socket.cpp
+++ b/myserver/src/base/unix_socket/unix_socket.cpp
@@ -133,7 +133,7 @@ Socket* UnixSocket::accept ()
  */
 int UnixSocket::readHandle (Handle* fd)
 {
-  return readFileHandle (fd, fd);
+  return readFileHandle (this->fd, fd);
 }
 
 /*!



commit f1818a6b9fdbd109d417c742f5c21fe9485fe4a0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 10:25:26 2010 +0100

    Rename file

diff --git a/misc/wingen/NSIS installer script.nsi b/misc/wingen/nsis_installer_script.nsi
similarity index 100%
rename from misc/wingen/NSIS installer script.nsi
rename to misc/wingen/nsis_installer_script.nsi



commit 5362bb29ea99952336f047b443cb1a15e9c677f4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 10:24:06 2010 +0100

    Remove unused files.

diff --git a/misc/Sudoku.Core/INSTALL b/misc/Sudoku.Core/INSTALL
deleted file mode 120000
index cbd1c80..0000000
--- a/misc/Sudoku.Core/INSTALL
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/INSTALL
\ No newline at end of file
diff --git a/misc/control/MyServer Configure.dev b/misc/control/MyServer Configure.dev
deleted file mode 100644
index 1a82f5b..0000000
--- a/misc/control/MyServer Configure.dev	
+++ /dev/null
@@ -1,189 +0,0 @@
-[Project]
-FileName=MyServer Configure.dev
-Name=MyServer Configure
-UnitCount=9
-Type=0
-Ver=1
-ObjFiles=
-Includes=..;.
-Libs=
-PrivateResource=MyServer_Configure_private.rc
-ResourceIncludes=
-MakeIncludes=
-Compiler=-DWIN32_@@_
-CppCompiler=
-Linker=../src/securestr.o ../src/utility.o  ../src/safetime.o   ../src/thread.o  ../src/file.o ../src/ssl_socket.o   ../src/stringutils.o ../src/socket.o ../src/stream.o ../src/find_data.o ../src/xml_parser.o  ../src/mem_buff.o ../src/md5.o   ../src/files_utility.o -lfltk -lm -lz.dll -llibxml2 -liconv -lintl -lssl  -lcrypto -lwininet -lwsock32  -lole32  -luuid  _@@_
-IsCpp=1
-Icon=MyServer Configure.ico
-ExeOutput=..\binaries
-ObjectOutput=tmp
-OverrideOutput=0
-OverrideOutputName=myserver-configure.exe
-HostApplication=
-Folders=
-CommandLine=
-UseCustomMakefile=0
-CustomMakefile=
-IncludeVersionInfo=1
-SupportXPThemes=0
-CompilerSet=0
-CompilerSettings=0000000001000000000100
-
-[VersionInfo]
-Major=0
-Minor=9
-Release=0
-Build=3
-LanguageID=1033
-CharsetID=1252
-CompanyName=MyServer Project
-FileVersion=0.9.0
-FileDescription=MyServer Configuration Interface
-InternalName=
-LegalCopyright=MyServer Team
-LegalTrademarks=
-OriginalFilename=MyServer Configure.exe
-ProductName=MyServer
-ProductVersion=0.9.0
-AutoIncBuildNr=0
-
-[Unit2]
-FileName=language.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit5]
-FileName=service.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit9]
-FileName=progress.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit11]
-FileName=vhost.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit12]
-FileName=vector.h
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit13]
-FileName=vector.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit14]
-FileName=control_client.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit15]
-FileName=progress.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit1]
-FileName=fltkconfig.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit3]
-FileName=myserver-configure.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit4]
-FileName=mimetype.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit6]
-FileName=vhost.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit7]
-FileName=vector.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit8]
-FileName=control_client.cpp
-CompileCpp=1
-Folder=MyServer Configure
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
diff --git a/misc/control/MyServer Configure.ico b/misc/control/MyServer Configure.ico
deleted file mode 100644
index d7a0fa1..0000000
Binary files a/misc/control/MyServer Configure.ico and /dev/null differ



commit 8572121133a4437d8ae1fc1d095dfeb5f2e83ea1
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 10:20:42 2010 +0100

    Invoke autoreconf in place of aclocal/autoheader/automake/autoconf

diff --git a/misc/Sudoku.Core/INSTALL b/misc/Sudoku.Core/INSTALL
index 5bb6e7b..cbd1c80 120000
--- a/misc/Sudoku.Core/INSTALL
+++ b/misc/Sudoku.Core/INSTALL
@@ -1 +1 @@
-/usr/share/automake-1.10/INSTALL
\ No newline at end of file
+/usr/share/automake-1.11/INSTALL
\ No newline at end of file
diff --git a/misc/Sudoku.Core/autogen.sh b/misc/Sudoku.Core/autogen.sh
index 3c9e3f1..e033c27 100755
--- a/misc/Sudoku.Core/autogen.sh
+++ b/misc/Sudoku.Core/autogen.sh
@@ -1,69 +1,3 @@
 #! /bin/sh
 
-PROJECT=Sudoku
-FILE=
-CONFIGURE=configure.ac
-
-: ${AUTOCONF=autoconf}
-: ${AUTOHEADER=autoheader}
-: ${AUTOMAKE=automake}
-: ${ACLOCAL=aclocal}
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-TEST_TYPE=-f
-aclocalinclude="-I . $ACLOCAL_FLAGS"
-
-DIE=0
-
-($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
-        echo
-        echo "You must have autoconf installed to compile $PROJECT."
-        echo "Download the appropriate package for your distribution,"
-        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
-        DIE=1
-}
-
-($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
-        echo
-        echo "You must have automake installed to compile $PROJECT."
-        echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
-        echo "(or a newer version if it is available)"
-        DIE=1
-}
-
-if test "$DIE" -eq 1; then
-        exit 1
-fi
-                                                                                
-#test $TEST_TYPE $FILE || {
-#        echo "You must run this script in the top-level $PROJECT directory"
-#        exit 1
-#}
-
-if test -z "$*"; then
-        echo "I am going to run ./configure with no arguments - if you wish "
-        echo "to pass any to it, please specify them on the $0 command line."
-fi
-
-case $CC in
-*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
-esac
-
-echo "Running $ACLOCAL $aclocalinclude ..."
-$ACLOCAL $aclocalinclude
-
-echo "Running $AUTOHEADER ..."
-$AUTOHEADER
-
-echo "Running $AUTOMAKE --gnu $am_opt ..."
-$AUTOMAKE --add-missing --gnu $am_opt
-
-echo "Running $AUTOCONF ..."
-$AUTOCONF
-
-echo Running $srcdir/configure $conf_flags "$@" ...
-$srcdir/configure --enable-maintainer-mode $conf_flags "$@" \
+autoreconf -fis



commit 8f32cabfed5a7156f75afd2796ad585b59af1832
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 10:17:45 2010 +0100

    Rename `socketHandle' to `fd'.

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index 92352b8..c2b757a 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -110,7 +110,7 @@ public:
   virtual int write (const char* buffer, u_long len, u_long *nbw);
 
 protected:
-  SocketHandle socketHandle;
+  SocketHandle fd;
 
   /*! Pointer to the socket that has accepted this connection.  */
   Socket *serverSocket;
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index 661fc84..7ed0021 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -65,7 +65,7 @@ int Socket::startupSocketLib ()
  */
 Handle Socket::getHandle ()
 {
-  return (Handle) socketHandle;
+  return (Handle) fd;
 }
 
 /*!
@@ -73,7 +73,7 @@ Handle Socket::getHandle ()
  */
 void Socket::setHandle (SocketHandle h)
 {
-  socketHandle = h;
+  fd = h;
 }
 
 /*!
@@ -81,7 +81,7 @@ void Socket::setHandle (SocketHandle h)
  */
 int Socket::operator==(Socket* s)
 {
-  return socketHandle == s->socketHandle;
+  return fd == s->fd;
 }
 
 /*!
@@ -89,7 +89,7 @@ int Socket::operator==(Socket* s)
  */
 int Socket::operator=(Socket* s)
 {
-  socketHandle = s->socketHandle;
+  fd = s->fd;
   serverSocket = s->serverSocket;
   throttlingRate = s->throttlingRate;
   isNonBlocking = s->isNonBlocking;
@@ -100,8 +100,8 @@ int Socket::operator=(Socket* s)
  */
 int Socket::socket (int af, int type, int protocol)
 {
-  socketHandle = ::socket (af, type, protocol);
-  return socketHandle;
+  fd = ::socket (af, type, protocol);
+  return fd;
 }
 
 /*!
@@ -119,7 +119,7 @@ Socket::Socket (SocketHandle handle)
  */
 Socket::Socket (Socket* socket)
 {
-  socketHandle = socket->socketHandle;
+  fd = socket->fd;
   serverSocket = socket->serverSocket;
   throttlingRate = socket->throttlingRate;
   isNonBlocking = socket->isNonBlocking;
@@ -174,7 +174,7 @@ int Socket::bind (MYSERVER_SOCKADDR* sa, int namelen)
       )
     return -1;
 
-  return ::bind (socketHandle, (struct sockaddr*) sa, namelen);
+  return ::bind (fd, (struct sockaddr*) sa, namelen);
 }
 
 /*!
@@ -182,7 +182,7 @@ int Socket::bind (MYSERVER_SOCKADDR* sa, int namelen)
  */
 int Socket::listen (int max)
 {
-  return ::listen (socketHandle, max);
+  return ::listen (fd, max);
 }
 
 /*!
@@ -190,7 +190,7 @@ int Socket::listen (int max)
  */
 Socket* Socket::accept (MYSERVER_SOCKADDR* sa, socklen_t* sockaddrlen)
 {
-  int acceptedHandle = ::accept (socketHandle, (struct sockaddr *)sa,
+  int acceptedHandle = ::accept (fd, (struct sockaddr *)sa,
                                           sockaddrlen);
 
   if (acceptedHandle >= 0)
@@ -205,10 +205,10 @@ Socket* Socket::accept (MYSERVER_SOCKADDR* sa, socklen_t* sockaddrlen)
 int Socket::close ()
 {
   int ret = -1;
-  if (socketHandle >= 0)
-    ret = ::close (socketHandle);
+  if (fd >= 0)
+    ret = ::close (fd);
 
-  socketHandle = -1;
+  fd = -1;
   return ret;
 }
 
@@ -233,7 +233,7 @@ MYSERVER_HOSTENT *Socket::gethostbyname (const char *hostname)
  */
 int Socket::shutdown (int how)
 {
-  return ::shutdown (socketHandle, how);
+  return ::shutdown (fd, how);
 }
 
 /*!
@@ -242,7 +242,7 @@ int Socket::shutdown (int how)
 int  Socket::setsockopt (int level, int optname,
                        const char *optval, int optlen)
 {
-  return ::setsockopt (socketHandle, level, optname, optval, optlen);
+  return ::setsockopt (fd, level, optname, optval, optlen);
 }
 
 /*!
@@ -326,7 +326,7 @@ int Socket::getLocalIPsList (string &out)
  */
 int Socket::rawSend (const char* buffer, int len, int flags)
 {
-  return ::send (socketHandle, buffer, len, flags);
+  return ::send (fd, buffer, len, flags);
 }
 
 /*!
@@ -379,7 +379,7 @@ int Socket::send (const char* buffer, int len, int flags)
  */
 int Socket::ioctlsocket (long cmd, unsigned long* argp)
 {
-  return ::ioctl (socketHandle, cmd, argp);
+  return ::ioctl (fd, cmd, argp);
 }
 
 /*!
@@ -493,7 +493,7 @@ int Socket::connect (const char* host, u_short port)
     return -1;
 
   /*! If the socket is not created, create it before use. */
-  if (socketHandle == -1 &&
+  if (fd == -1 &&
       Socket::socket (AF_INET, SOCK_STREAM, 0) == -1)
     return -1;
 
@@ -527,7 +527,7 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
  )
     return -1;
 
-  return ::connect (socketHandle, (sockaddr *) sa, na);
+  return ::connect (fd, (sockaddr *) sa, na);
 }
 
 /*!
@@ -549,7 +549,7 @@ int Socket::recv (char* buffer,int len,int flags)
 {
   int err = 0;
 
-  err = ::recv (socketHandle, buffer, len, flags);
+  err = ::recv (fd, buffer, len, flags);
 
   if ( err < 0 && errno == EAGAIN && isNonBlocking)
     return 0;
@@ -594,7 +594,7 @@ int Socket::setNonBlocking (int nonBlocking)
   u_long nonblock = nonBlocking ? 1 : 0;
   ret = ioctlsocket (FIONBIO, &nonblock);
 #else
-  flags = fcntl (socketHandle, F_GETFL, 0);
+  flags = fcntl (fd, F_GETFL, 0);
   if (flags < 0)
     return -1;
 
@@ -603,7 +603,7 @@ int Socket::setNonBlocking (int nonBlocking)
   else
     flags &= ~O_NONBLOCK;
 
-  ret = fcntl (socketHandle, F_SETFL, flags);
+  ret = fcntl (fd, F_SETFL, flags);
 
   isNonBlocking = nonBlocking ? true : false;
 #endif
@@ -625,7 +625,7 @@ int Socket::gethostname (char *name, int namelen)
 int Socket::getsockname (MYSERVER_SOCKADDR *ad, int *namelen)
 {
   socklen_t len =(socklen_t) *namelen;
-  int ret = ::getsockname (socketHandle, (struct sockaddr *)ad, &len);
+  int ret = ::getsockname (fd, (struct sockaddr *)ad, &len);
   *namelen = (int)len;
   return ret;
 }
@@ -658,14 +658,14 @@ int Socket::dataOnRead (int sec, int usec)
   tv.tv_usec = usec;
 
   FD_ZERO (&readfds);
-  FD_SET (socketHandle, &readfds);
+  FD_SET (fd, &readfds);
 
-  ret = ::select (socketHandle + 1, &readfds, NULL, NULL, &tv);
+  ret = ::select (fd + 1, &readfds, NULL, NULL, &tv);
 
   if (ret <= 0)
     return 0;
 
-  if (FD_ISSET (socketHandle, &readfds))
+  if (FD_ISSET (fd, &readfds))
     return 1;
 
   return 0;
diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index ca0f017..75f95d8 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -85,7 +85,7 @@ int SslSocket::shutdown (int how)
   if (sslConnection)
     SSL_shutdown (sslConnection);
 
-  return ::shutdown (socketHandle, how);
+  return ::shutdown (fd, how);
 }
 
 /*!
@@ -129,7 +129,7 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
     return -1;
 
   /*! Do the TCP connection.  */
-  if (::connect (socketHandle, (sockaddr *) sa, na))
+  if (::connect (fd, (sockaddr *) sa, na))
     {
       SSL_CTX_free (sslContext);
       sslContext = 0;
@@ -142,7 +142,7 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
       sslContext = 0;
       return -1;
     }
-  SSL_set_fd (sslConnection, socketHandle);
+  SSL_set_fd (sslConnection, fd);
   if (SSL_connect (sslConnection) < 0)
     {
       SSL_CTX_free (sslContext);
@@ -211,7 +211,7 @@ int SslSocket::sslAccept ()
       return -1;
     }
 
-  if (SSL_set_fd (sslConnection, socketHandle) == 0)
+  if (SSL_set_fd (sslConnection, fd) == 0)
     {
       shutdown (2);
       freeSSL ();
diff --git a/myserver/src/base/socket_pair/socket_pair.cpp b/myserver/src/base/socket_pair/socket_pair.cpp
index 7ed8f29..d2d3dbb 100644
--- a/myserver/src/base/socket_pair/socket_pair.cpp
+++ b/myserver/src/base/socket_pair/socket_pair.cpp
@@ -63,7 +63,7 @@ int SocketPair::create ()
 #ifndef WIN32
   int ret = socketpair (AF_UNIX, SOCK_STREAM, 0, (int*) handles);
   if (ret == 0)
-    socketHandle = handles[0];
+    fd = handles[0];
 
   return ret;
 #else
@@ -113,7 +113,7 @@ int SocketPair::create ()
       if ((handles[1] = ::accept (listener, NULL, NULL)) < 0)
         break;
 
-      socketHandle = handles[0];
+      fd = handles[0];
 
       ::close (listener);
       return 0;
@@ -162,7 +162,7 @@ void SocketPair::inverted (SocketPair& inverted)
   inverted.handles[0] = handles[1];
   inverted.handles[1] = handles[0];
 
-  inverted.socketHandle = handles[1];
+  inverted.fd = handles[1];
 }
 
 /*!
diff --git a/myserver/src/base/unix_socket/unix_socket.cpp b/myserver/src/base/unix_socket/unix_socket.cpp
index 7e11b18..fdfabb9 100644
--- a/myserver/src/base/unix_socket/unix_socket.cpp
+++ b/myserver/src/base/unix_socket/unix_socket.cpp
@@ -133,7 +133,7 @@ Socket* UnixSocket::accept ()
  */
 int UnixSocket::readHandle (Handle* fd)
 {
-  return readFileHandle (socketHandle, fd);
+  return readFileHandle (fd, fd);
 }
 
 /*!
@@ -143,5 +143,5 @@ int UnixSocket::readHandle (Handle* fd)
  */
 int UnixSocket::writeHandle (Handle fd)
 {
-  return writeFileHandle (socketHandle, fd);
+  return writeFileHandle (fd, fd);
 }

-----------------------------------------------------------------------

Summary of changes:
 misc/Sudoku.Core/INSTALL                           |    1 -
 misc/Sudoku.Core/autogen.sh                        |   68 +-------
 misc/control/MyServer Configure.dev                |  189 --------------------
 misc/control/MyServer Configure.ico                |  Bin 2238 -> 0 bytes
 ...taller script.nsi => nsis_installer_script.nsi} |    0
 myserver/include/base/socket/socket.h              |    2 +-
 myserver/src/base/file/file.cpp                    |   44 +++--
 myserver/src/base/socket/socket.cpp                |   70 ++++----
 myserver/src/base/socket/ssl_socket.cpp            |    8 +-
 myserver/src/base/socket_pair/socket_pair.cpp      |    6 +-
 myserver/src/base/unix_socket/unix_socket.cpp      |   80 ++++-----
 11 files changed, 110 insertions(+), 358 deletions(-)
 delete mode 120000 misc/Sudoku.Core/INSTALL
 delete mode 100644 misc/control/MyServer Configure.dev
 delete mode 100644 misc/control/MyServer Configure.ico
 rename misc/wingen/{NSIS installer script.nsi => nsis_installer_script.nsi} (100%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 10 11:28:11 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NfFQA-000758-QN
	for mharc-myserver-commit@gnu.org; Wed, 10 Feb 2010 11:28:10 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NfFQ8-00073n-2H
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:28:08 -0500
Received: from [199.232.76.173] (port=44461 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NfFQ7-00072u-1I
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:28:07 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1NfFPk-0002SD-FO
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:28:06 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:55356
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1NfFPj-0002KO-2a
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:27:44 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NfFPi-0002yu-G6
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 16:27:42 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NfFPh-00059y-R1
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 16:27:42 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 04bbfafe6dc25628398e64090d1f194acd2ce772
X-Git-Newrev: 38827a01d9360f56ba99e0e866985883506a4d78
Message-Id: <E1NfFPh-00059y-R1@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 10 Feb 2010 16:27:42 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-55-g38827a0
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Feb 2010 16:28:08 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  38827a01d9360f56ba99e0e866985883506a4d78 (commit)
       via  80b5a9246fc23c297854945a678ac5d28c6b0b40 (commit)
       via  3ac10e92c270d62bfa0d44028d2f49c27ea00c72 (commit)
       via  506db9b0068fee4c8777fea6d953f13fe9c45858 (commit)
       via  6a5c898f27b342c6cbcccf8bb394396aa92e8535 (commit)
       via  e7313d7c92e16be37e7386eef8c46da0e485dd9f (commit)
      from  04bbfafe6dc25628398e64090d1f194acd2ce772 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 38827a01d9360f56ba99e0e866985883506a4d78
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 17:24:16 2010 +0100

    Remove SOCKET_ERROR definition

diff --git a/myserver/myserver.h b/myserver/myserver.h
index 279013d..748aacf 100644
--- a/myserver/myserver.h
+++ b/myserver/myserver.h
@@ -50,10 +50,6 @@ extern "C"
 
 typedef void* HANDLE;
 
-#ifndef SOCKET_ERROR
-# define SOCKET_ERROR -1
-#endif
-
 #endif
 
 extern "C"
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index a0bf313..93b60be 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -807,7 +807,7 @@ DEFINE_THREAD (SendAsciiFile, pParam)
             }
           if (pFtpuserData->m_pDataConnection->socket->
               send (auxiliaryBuffer.getBuffer (),
-                    (u_long) auxiliaryBuffer.getLength (), 0) == SOCKET_ERROR)
+                    (u_long) auxiliaryBuffer.getLength (), 0) < 0)
             {
               ftpReply (pConnection, 451);
               file->close ();
@@ -983,15 +983,15 @@ DEFINE_THREAD (SendImageFile, pParam)
       auxiliaryBuffer.setRealLength (1024);
       while (filesize != 0)
         {
+          Socket *socket = pFtpuserData->m_pDataConnection->socket;
           nBufferSize =
             std::min (static_cast < u_long > (filesize),
                       static_cast < u_long >
                       (auxiliaryBuffer.getRealLength () / 2));
 
           if (file->read (auxiliaryBuffer.getBuffer (), nBufferSize, &nbr)
-              || pFtpuserData->m_pDataConnection->socket->send (auxiliaryBuffer.getBuffer (),
-                                                                (u_long)nBufferSize, 0)
-              == SOCKET_ERROR)
+              || socket->send (auxiliaryBuffer.getBuffer (),
+                               (u_long) nBufferSize, 0) < 0)
             {
               ftpReply (pConnection, 451);
               file->close ();
@@ -1163,9 +1163,10 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
       int nLineLength = 0;
       std::string sLine;
       u_long nbr;
-      while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
-                                                            (u_long) buffer.getRealLength () - 1, &nbr)
-             != SOCKET_ERROR && nbr != 0)
+      Socket *socket = pFtpuserData->m_pDataConnection->socket;
+      while (!socket->read (buffer.getBuffer (),
+                           (u_long) buffer.getRealLength () - 1, &nbr)
+             && nbr != 0)
         {
           memset (auxiliaryBuffer.getBuffer (), 0,
                   auxiliaryBuffer.getRealLength ());
@@ -1356,12 +1357,10 @@ DEFINE_THREAD (ReceiveImageFile, pParam)
       MemBuf buffer;
       buffer.setRealLength (1024);
       memset (buffer.getBuffer (), 0, buffer.getRealLength ());
-      while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
-                                                            (u_long) buffer.
-                                                            getRealLength () -
-                                                            1,
-                                                            &nbr) !=
-             SOCKET_ERROR && nbr != 0)
+      Socket *socket = pFtpuserData->m_pDataConnection->socket;
+      while (!socket->read (buffer.getBuffer (),
+                            (u_long) buffer.getRealLength () - 1,
+                            &nbr) && nbr != 0)
         {
           file.write (buffer.getBuffer (), nbr, &nbr);
           if (pFtpuserData->m_bBreakDataConnection)
@@ -1876,7 +1875,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
 
   if (pFtpuserData->m_pDataConnection->socket->
       send (td.auxiliaryBuffer->getBuffer (),
-            (u_long) td.auxiliaryBuffer->getLength (), 0) == SOCKET_ERROR)
+            (u_long) td.auxiliaryBuffer->getLength (), 0) < 0)
     {
       ftpReply (451);
     }
@@ -1947,7 +1946,7 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
 
   if (pFtpuserData->m_pDataConnection->socket->
       send (td.auxiliaryBuffer->getBuffer (),
-            (u_long) td.auxiliaryBuffer->getLength (), 0) == SOCKET_ERROR)
+            (u_long) td.auxiliaryBuffer->getLength (), 0) < 0)
     {
       ftpReply (451);
     }
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 69fb371..2c0cdb5 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -164,7 +164,7 @@ int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
       /* Send the HTTP header. */
       ret = td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
                                           td->auxiliaryBuffer->getLength (), 0);
-      if (ret == SOCKET_ERROR)
+      if (ret < 0)
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
@@ -215,7 +215,7 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
       /* Send our HTTP header.  */
       ret = td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
                                           (u_long) td->auxiliaryBuffer->getLength (), 0);
-      if (ret == SOCKET_ERROR)
+      if (ret < 0)
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
@@ -224,7 +224,7 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
       /* Send the client request header as the HTTP body.  */
       ret = td->connection->socket->send (td->buffer->getBuffer (),
                                           contentLength, 0);
-      if (ret == SOCKET_ERROR)
+      if (ret < 0)
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;



commit 80b5a9246fc23c297854945a678ac5d28c6b0b40
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 17:19:52 2010 +0100

    Remove INVALID_SOCKET definition

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index c2b757a..34dde60 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -44,9 +44,6 @@ extern "C"
 #  include <stdio.h>
 #  include <unistd.h>
 }
-
-#  define INVALID_SOCKET -1
-#  define SD_BOTH SHUT_RDWR
 # endif
 
 typedef int SocketHandle;
diff --git a/myserver/myserver.h b/myserver/myserver.h
index 13e5af5..279013d 100644
--- a/myserver/myserver.h
+++ b/myserver/myserver.h
@@ -54,10 +54,6 @@ typedef void* HANDLE;
 # define SOCKET_ERROR -1
 #endif
 
-#ifndef INVALID_SOCKET
-# define INVALID_SOCKET -1
-#endif
-
 #endif
 
 extern "C"
diff --git a/myserver/src/base/process/fork_server.cpp b/myserver/src/base/process/fork_server.cpp
index ab8be8b..e0c975f 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -404,7 +404,7 @@ int ForkServer::generateListenerSocket (Socket &socket, u_short *port)
 
   socket.socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
 
-  if (socket.getHandle () == (Handle)INVALID_SOCKET)
+  if (socket.getHandle () < 0)
     return -1;
 
   MYSERVER_SOCKADDR_STORAGE sockaddr = { 0 };
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 7cba6b2..13c39b2 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -481,7 +481,7 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
 
   server->socket.socket (AF_INET, SOCK_STREAM, 0);
 
-  if (server->socket.getHandle () == (Handle)INVALID_SOCKET)
+  if (server->socket.getHandle () < 0)
     return 1;
 
   ((sockaddr_in *)(&serverSockAddrIn))->sin_family = AF_INET;
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index b8d5ff0..43fe9b1 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -92,7 +92,7 @@ int ListenThreads::createServerAndListener (u_short port)
       if (serverSocketIPv4 != NULL)
         {
           serverSocketIPv4->socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
-          if (serverSocketIPv4->getHandle () == (Handle)INVALID_SOCKET)
+          if (serverSocketIPv4->getHandle () < 0)
             {
               server->log (MYSERVER_LOG_MSG_ERROR,
                             _("Error while creating the server socket"));
@@ -146,7 +146,7 @@ int ListenThreads::createServerAndListener (u_short port)
       if (serverSocketIPv6 != NULL)
         {
           serverSocketIPv6->socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
-          if (serverSocketIPv6->getHandle () == (FileHandle)INVALID_SOCKET)
+          if (serverSocketIPv6->getHandle () < 0)
             {
               server->log (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 13e0852..a0bf313 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -543,7 +543,7 @@ void Ftp::pasv ()
       asockInLen = sizeof (sockaddr_in);
       asock = pFtpuserData->m_pDataConnection->socket->accept (&asockIn,
                                                                &asockInLen);
-      if (asock->getHandle () == (Handle) INVALID_SOCKET)
+      if (asock->getHandle () < 0)
         return;
 
       pFtpuserData->m_pDataConnection->socket->shutdown (SD_BOTH);
@@ -1530,8 +1530,9 @@ Ftp::openDataPassive ()
 
   Socket *pSocket = new Socket ();
   pSocket->socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
-  if (pSocket->getHandle () == (Handle) INVALID_SOCKET)
+  if (pSocket->getHandle () < 0)
     return 0;
+
   int nReuseAddr = 1;
   MYSERVER_SOCKADDR_STORAGE storage = { 0 };
   ((sockaddr_in *) (&storage))->sin_family = AF_INET;



commit 3ac10e92c270d62bfa0d44028d2f49c27ea00c72
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 17:14:52 2010 +0100

    Fix compiler warnings

diff --git a/myserver/include/base/slab/slab.h b/myserver/include/base/slab/slab.h
index 7a96802..12644a1 100644
--- a/myserver/include/base/slab/slab.h
+++ b/myserver/include/base/slab/slab.h
@@ -60,7 +60,7 @@ public:
   {
     int i = mask.find ();
 
-    if (i == -1 || i >= capacity)
+    if (i == -1 || static_cast <u_long> (i) >= capacity)
       return NULL;
 
     mask.unset (i);
diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index 19a9259..9bc982e 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -233,8 +233,6 @@ public:
                                  u_long tid)
   {
     Ftp ftp;
-    int ret = 0;
-
     return ftp.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
                                   reqLen, tid);
   }
diff --git a/myserver/src/base/bitvec/bitvec.cpp b/myserver/src/base/bitvec/bitvec.cpp
index 5425204..43a9f2c 100644
--- a/myserver/src/base/bitvec/bitvec.cpp
+++ b/myserver/src/base/bitvec/bitvec.cpp
@@ -63,8 +63,8 @@ void BitVec::init (int capacity, bool val)
     this->data[i] = 0;
 
   if (val)
-    for (u_long i = 0; i < capacity; i++)
-      set (i);
+    for (int i = 0; i < capacity; i++)
+      set (static_cast <u_long> (i));
 
   lastFound = 0;
 }
@@ -79,10 +79,10 @@ void BitVec::init (int capacity, bool val)
 int BitVec::ffs ()
 {
   int p = 0;
-  for (int i = 0; i < dataSize; i++)
-    if (p = ffsl (data[i]))
+  for (u_long i = 0; i < dataSize; i++)
+    if ((p = ffsl (data[i])))
       {
-        int r = (i * sizeof (long int) * 8) + p - 1;
+        u_long r = (i * sizeof (long int) * 8) + p - 1;
         if (r < capacity)
           return r;
       }
@@ -105,10 +105,10 @@ int BitVec::find ()
 {
   int p = 0;
 
-  for (int i = lastFound; i < dataSize + lastFound; i++)
-    if (p = ffsl (data[i % dataSize]))
+  for (u_long i = lastFound; i < dataSize + lastFound; i++)
+    if ((p = ffsl (data[i % dataSize])))
       {
-        int r = (i * sizeof (long int) * 8) + p - 1;
+        u_long r = (i * sizeof (long int) * 8) + p - 1;
         if (r < capacity)
           {
             lastFound = i;
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 83c645c..cc91636 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -139,11 +139,9 @@ int File::truncate (u_long size)
  */
 int File::openFile (const char* nfilename,u_long opt)
 {
-  long ret = 0;
   struct stat fStats;
   int flags;
 
-
   filename.assign (nfilename);
 
   if ((opt & File::READ) && (opt & File::WRITE))
@@ -373,7 +371,7 @@ int File::fastCopyToSocket (Socket *dest, u_long firstByte, MemBuf *buf, u_long
 
       *nbw += ret;
 
-      if (fileSize == offset)
+      if (fileSize == (size_t) offset)
         return 0;
     }
 
@@ -401,7 +399,7 @@ int File::fastCopyToSocket (Socket *dest, u_long firstByte, MemBuf *buf, u_long
 
       *nbw += tmpNbw;
     }
+#endif
 
   return 0;
-#endif
 }
diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index ca18a92..971aa9b 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -155,8 +155,6 @@ int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
 {
   File srcFile;
   File destFile;
-  char buffer[4096];
-  size_t dim;
 
   if (srcFile.openFile (src, File::READ))
     return -1;
@@ -377,8 +375,7 @@ int FilesUtility::chown (const char* filename, string &uid, string &gid)
  */
 int FilesUtility::getFilenameLength (const char *path, int *filename)
 {
-  int splitpoint, i = 0, j = 0;
-  splitpoint = static_cast<int>(strlen (path) - 1);
+  int splitpoint = static_cast<int> (strlen (path) - 1);
   while ((splitpoint > 0) && (path[splitpoint] != '/'))
     splitpoint--;
   *filename = splitpoint + 1;
diff --git a/myserver/src/base/process/fork_server.cpp b/myserver/src/base/process/fork_server.cpp
index 39c7404..ab8be8b 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -97,10 +97,10 @@ int ForkServer::readInt (Socket *sock, int *dest)
  */
 int ForkServer::readString (Socket *sock, char **out)
 {
-  int len;
+  u_long len;
   u_long nbr;
 
-  if (sock->read ((char*)&len, 4, &nbr) || nbr < 4)
+  if (sock->read ((char*) &len, 4, &nbr) || nbr < 4)
     {
       return -1;
     }
@@ -123,7 +123,7 @@ int ForkServer::readString (Socket *sock, char **out)
 int ForkServer::handleRequest (Socket *sock)
 {
 #ifndef WIN32
-  int ret, flags, stdIn = -1, stdOut = -1, stdErr = -1;
+  int flags, stdIn = -1, stdOut = -1, stdErr = -1;
   char *gid, *uid;
   int stdInPort = 0;
   char *exec;
diff --git a/myserver/src/base/process/process.cpp b/myserver/src/base/process/process.cpp
index 0e54502..a6932f8 100644
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -83,7 +83,7 @@ int Process::generateArgList (const char **args, size_t size, const char *proc,
   args[0] = proc;
 
   const char *arg = additionalArgs.c_str ();
-  int count = 1;
+  u_long count = 1;
   int len = additionalArgs.length ();
   int start = 0;
 
@@ -331,7 +331,7 @@ uid_t Process::getUid (const char *user)
     {
       uid_t uid = atol (user);
 
-      if (uid >= 0 && uid <= MAXUID)
+      if (uid >= 0L && uid <= (uid_t) MAXUID)
         return uid;
     }
 
@@ -357,7 +357,7 @@ gid_t Process::getGid (const char *grp)
     {
       gid_t gid = atol (grp);
 
-      if (gid >= 0 && gid <= MAXGID)
+      if (gid >= 0L && gid <= (gid_t) MAXGID)
         return gid;
     }
 
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 1959ae4..7cba6b2 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -270,7 +270,6 @@ void ProcessServerManager::addServer (ProcessServerManager::Server* server,
                                      const char* domain, const char* name)
 {
   ServerDomain *sd = createDomain (domain);
-  Server *old;
   string strName (name);
 
   mutex.lock ();
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index 19d0e17..d8ca272 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -74,9 +74,7 @@ XmlParser* XmlValidator::getParser (SecurityToken* st)
   secName = st->getData ("security.filename", MYSERVER_VHOST_CONF
                          | MYSERVER_SERVER_CONF, ".security.xml");
 
-  u_long maxSize = atol (st->getData ("security.max_size", MYSERVER_VHOST_CONF
-                                      | MYSERVER_SERVER_CONF, "0"));
-
+  /*TODO: check that file size is not bigger than "security.max_size".  */
   return cache->getParser (*(st->getDirectory ()), *(st->getSysDirectory ()),
                            false, secName);
 }
diff --git a/myserver/src/connection/connection.cpp b/myserver/src/connection/connection.cpp
index de96d65..ebee461 100644
--- a/myserver/src/connection/connection.cpp
+++ b/myserver/src/connection/connection.cpp
@@ -53,10 +53,6 @@ void Connection::destroy ()
   if (socket)
   {
     socket->shutdown (SD_BOTH);
-    char buffer[256];
-    int buffersize = 256;
-    int err;
-
     socket->close ();
     delete socket;
     socket = NULL;
diff --git a/myserver/src/filter/gzip/gzip.cpp b/myserver/src/filter/gzip/gzip.cpp
index 22f5008..da118f9 100644
--- a/myserver/src/filter/gzip/gzip.cpp
+++ b/myserver/src/filter/gzip/gzip.cpp
@@ -71,6 +71,8 @@ u_long Gzip::compressBound (int size)
 #else
   return -1;
 #endif
+
+  return 0;
 }
 
 /*!
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 438ef5d..c647554 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -417,7 +417,6 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
   u_long headerSize = 0;
   bool headerCompleted = false;
   u_long headerOffset = 0;
-  u_long nbw = 0;
   u_long nBytesRead;
 
   /* Parse initial chunks of data looking for the HTTP header.  */
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 7f96ce1..0bf2218 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -45,7 +45,6 @@ extern "C"
 int HttpFile::putFile (HttpThreadContext* td, string& filename)
 {
   u_long firstByte = td->request.rangeByteBegin;
-  int ret;
 
   try
   {
@@ -150,10 +149,8 @@ int HttpFile::putFile (HttpThreadContext* td, string& filename)
 int HttpFile::deleteFile (HttpThreadContext* td,
                           string& filename)
 {
-  int permissions = -1;
   string directory;
   string file;
-  int ret;
   try
     {
       if (!(td->permissions & MYSERVER_PERMISSION_DELETE))
@@ -171,7 +168,6 @@ int HttpFile::deleteFile (HttpThreadContext* td,
     {
       return td->http->raiseHTTPError (500);
     };
-
 }
 
 /*!
@@ -187,7 +183,7 @@ void HttpFile::generateEtag (string & etag, u_long mtime, u_long fsize)
   /* Do a bit rotation to have less significative bits in the middle.  */
   u_long x = ROL (mtime, 16) | fsize;
   char buf[16];
-  sprintf (buf, "%u", x);
+  sprintf (buf, "%lu", x);
   etag.assign (buf);
 }
 
@@ -505,10 +501,10 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
         if (bytesToSend)
           {
             /* Read from the file the bytes to send.  */
-            if (ret = file->read (td->buffer->getBuffer (),
+            if ((ret = file->read (td->buffer->getBuffer (),
                                   std::min (static_cast<u_long> (bytesToSend),
                       static_cast<u_long> (td->buffer->getRealLength () / 2)),
-                                  &nbr))
+                                  &nbr)))
               break;
 
             if (nbr == 0)
@@ -519,9 +515,9 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
 
             bytesToSend -= nbr;
 
-            if (ret = appendDataToHTTPChannel (td, td->buffer->getBuffer (),
+            if ((ret = appendDataToHTTPChannel (td, td->buffer->getBuffer (),
                            nbr, &(td->outputData), &chain, td->appendOutputs,
-                          useChunks, td->buffer->getRealLength (), &memStream))
+                        useChunks, td->buffer->getRealLength (), &memStream)))
               break;
 
             dataSent += nbr;
@@ -545,17 +541,17 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
                 Stream* tmpStream = chain.getStream ();
                 chain.setStream (&memStream);
                 memStream.refresh ();
-                if (ret = chain.flush (&nbw))
+                if ((ret = chain.flush (&nbw)))
                   break;
 
                 chain.setStream (tmpStream);
-                if (ret = memStream.read (td->buffer->getBuffer (),
-                                          td->buffer->getRealLength (), &nbr))
+                if ((ret = memStream.read (td->buffer->getBuffer (),
+                                          td->buffer->getRealLength (), &nbr)))
                   break;
 
-                if (ret = HttpDataHandler::appendDataToHTTPChannel (td,
+                if ((ret = HttpDataHandler::appendDataToHTTPChannel (td,
                         td->buffer->getBuffer (), nbr, &(td->outputData),
-                                   &chain, td->appendOutputs, useChunks))
+                                   &chain, td->appendOutputs, useChunks)))
                   break;
 
                 ret = HttpDataHandler::appendDataToHTTPChannel (td, 0, 0,
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 950e7eb..0ef7f6a 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -147,10 +147,11 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
 
   do
     {
-      if (client.recv (td->auxiliaryBuffer->getBuffer () + read,
-                       td->auxiliaryBuffer->getRealLength () - read,
-                       0,
-                       td->http->getTimeout ()) < 0)
+      ret = client.recv (td->auxiliaryBuffer->getBuffer () + read,
+                         td->auxiliaryBuffer->getRealLength () - read,
+                         0,
+                         td->http->getTimeout ());
+      if (ret < 0)
         return td->http->raiseHTTPError (500);
 
       read += ret;
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index dc72bfc..f8cce75 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -237,7 +237,7 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
     {
       while (!ctx->sock.bytesToRead ())
         {
-          if ((clock_t)(getTicks () - initialTicks) > td->http->getTimeout ())
+          if ((getTicks () - initialTicks) > (u_long) td->http->getTimeout ())
             break;
           Thread::wait (1);
         }
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index b108183..6988c41 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -472,7 +472,7 @@ PluginsManager::load (Server *server)
       HashMap<string, pair<int, int>* >::Iterator depIt = pinfo->begin ();
 
       string msversion (MYSERVER_VERSION);
-      int i = msversion.find ("-", 0);
+      size_t i = msversion.find ("-", 0);
       if (i != string::npos)
         msversion = msversion.substr (0, i);
 
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index ba16143..43144a3 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -763,7 +763,6 @@ int ControlProtocol::putFile (ConnectionPtr a, char *fn, File *in,
 {
   const char *filename = 0;
   File localfile;
-  int isAutoRebootToEnable = Server::getInstance ()->isAutorebootEnabled ();
   int ret = 0;
   /*! # of bytes read.  */
   u_long nbr = 0;
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index fb2c68f..13e0852 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -1773,10 +1773,10 @@ Ftp::list (const std::string & sParam /*= ""*/ )
             }
 
           char nlinkStr[12];
-          sprintf (nlinkStr, "%lu", fd.st_nlink);
+          sprintf (nlinkStr, "%lu", static_cast<u_long> (fd.st_nlink));
 
           char fdSizeStr[12];
-          sprintf (fdSizeStr, "%li", fd.size);
+          sprintf (fdSizeStr, "%lu", static_cast<u_long> (fd.size));
 
           auxiliaryBuffer << (const char *) perm << " " << nlinkStr << " "
                           << username << " " << username << " " << fdSizeStr
@@ -1859,10 +1859,10 @@ Ftp::list (const std::string & sParam /*= ""*/ )
             }
 
           char nlinkStr[12];
-          sprintf (nlinkStr, "%lu", fd.st_nlink);
+          sprintf (nlinkStr, "%lu", static_cast<u_long> (fd.st_nlink));
 
           char fdSizeStr[12];
-          sprintf (fdSizeStr, "%li", fd.size);
+          sprintf (fdSizeStr, "%lu", static_cast<u_long> (fd.size));
 
           auxiliaryBuffer << (const char *) perm << " " << nlinkStr << " "
                           << username << " " << username << " " << fdSizeStr
@@ -2496,7 +2496,7 @@ void Ftp::size (const std::string & sPath)
     }
 
   char size[12];
-  sprintf (size, "%l", f.getFileSize ());
+  sprintf (size, "%lu", static_cast <u_long> (f.getFileSize ()));
   f.close ();
 
   ftpReply (213, size);
diff --git a/myserver/src/protocol/ftp/ftp_lexer.cpp b/myserver/src/protocol/ftp/ftp_lexer.cpp
index 183b888..32602f6 100644
--- a/myserver/src/protocol/ftp/ftp_lexer.cpp
+++ b/myserver/src/protocol/ftp/ftp_lexer.cpp
@@ -1,3 +1,10 @@
 /* We need this hack to ensure myserver.h is include before any other file.  */
 #include "myserver.h"
 #include "ftp_lexer.out.cpp"
+
+/* Shutup a warning.  */
+void
+ftp_lexer_dummy ()
+{
+  yyunput (0, NULL, NULL);
+}
diff --git a/myserver/src/protocol/gopher/engine.cpp b/myserver/src/protocol/gopher/engine.cpp
index d75425d..87780cf 100644
--- a/myserver/src/protocol/gopher/engine.cpp
+++ b/myserver/src/protocol/gopher/engine.cpp
@@ -280,7 +280,6 @@ void GopherEngine::infoFile (const string &fname, const string &path, GopherMenu
     {
       MemBuf buff;
       u_long real;
-      int sts;
       fsize = f.getFileSize ();
       buff.setLength (fsize);
       f.read (buff.getBuffer (), fsize, &real);
diff --git a/myserver/src/protocol/gopher/gopher.cpp b/myserver/src/protocol/gopher/gopher.cpp
index 3ab3fcb..eac81db 100644
--- a/myserver/src/protocol/gopher/gopher.cpp
+++ b/myserver/src/protocol/gopher/gopher.cpp
@@ -59,11 +59,12 @@ const char *Gopher::getNameImpl ()
 
 int Gopher::loadProtocolStatic ()
 {
+  return 0;
 }
 
 int Gopher::unLoadProtocolStatic ()
 {
-  return 1;
+  return 0;
 }
 
 /*!
@@ -101,6 +102,7 @@ int Gopher::controlConnection (ConnectionPtr pConnection,
   GopherContent &Gu = g.incoming (GopherRequest (command.substr (0, loc - 1),
                                             pConnection), pConnection->host);
   reply (pConnection,Gu);
+  return ClientsThread::DELETE_CONNECTION;
 }
 
 void Gopher::reply (ConnectionPtr pConnection,
diff --git a/myserver/src/protocol/gopher/gopher_content.cpp b/myserver/src/protocol/gopher/gopher_content.cpp
index 63e3d28..84fc797 100644
--- a/myserver/src/protocol/gopher/gopher_content.cpp
+++ b/myserver/src/protocol/gopher/gopher_content.cpp
@@ -33,7 +33,6 @@ void GopherMenu::addIntro (string freeText, string host, string port)
   size_t size = freeText.size ();
   char myline[size];
   vector<GopherItem> tmp;
-  istream *res;
   istringstream str (freeText);
   while (!str.getline (myline, size).eof ())
     {
@@ -56,7 +55,7 @@ void GopherMenu::addItem (GopherItem i)
 
 void GopherMenu::toProtocol (Socket *s)
 {
-  for(int i = 0; i < Items.size (); i++)
+  for (u_long i = 0; i < Items.size (); i++)
     Items.at (i).toProtocol (s);
 
   s->send (".\n", 3, 0);
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 8a6b7d9..69fb371 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -459,7 +459,7 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
 {
   string directory;
   string file;
-  int filenamePathLen;
+  u_long filenamePathLen;
   string dirscan;
   int ret;
 
@@ -1628,8 +1628,6 @@ int Http::getPath (HttpThreadContext* td, string& filenamePath,
  */
 int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
 {
-  int i;
-  int ret;
   string key ("http.default_file");
   NodeTree<string> *node = td->securityToken.getNodeTree (key,
                      MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, NULL);
@@ -1773,6 +1771,7 @@ int Http::sendAuth ()
  */
 int Http::loadProtocolStatic ()
 {
+  return 0;
 }
 
 /*!
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index e87cd65..3290dd0 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -64,12 +64,12 @@ extern "C"
 
 Server* Server::instance = NULL;
 
-Server::Server () : connectionsScheduler (this),
-                   listenThreads (&connectionsScheduler, this),
-                   authMethodFactory (&cryptAlgoManager),
-                   validatorFactory (),
-                   securityManager (&validatorFactory, &authMethodFactory),
-                   connectionsPool (100)
+Server::Server () : connectionsPool (100),
+                    connectionsScheduler (this),
+                    listenThreads (&connectionsScheduler, this),
+                    authMethodFactory (&cryptAlgoManager),
+                    validatorFactory (),
+                    securityManager (&validatorFactory, &authMethodFactory)
 {
   toReboot = false;
   autoRebootEnabled = true;
@@ -563,7 +563,6 @@ void Server::displayBoot ()
     {
       try
         {
-          size_t length;
           string softwareSignature = "************ GNU MyServer "
             MYSERVER_VERSION " ************";
 
diff --git a/myserver/tests/test_slab.cpp b/myserver/tests/test_slab.cpp
index 1011fba..42b29fc 100644
--- a/myserver/tests/test_slab.cpp
+++ b/myserver/tests/test_slab.cpp
@@ -78,7 +78,7 @@ public:
     Slab<TestSlabRecord> slabs (N);
     TestSlabRecord *recs[N];
 
-    for (int j = 0; j < N; j++)
+    for (u_long j = 0; j < N; j++)
       {
         recs[j] = slabs.get ();
         CPPUNIT_ASSERT (recs[j]);
@@ -87,7 +87,7 @@ public:
     /* No more free instances.  */
     CPPUNIT_ASSERT_EQUAL (slabs.get (), (TestSlabRecord*)NULL);
 
-    for (int j = 0; j < N; j++)
+    for (u_long j = 0; j < N; j++)
       slabs.put (recs[j]);
 
 
@@ -100,13 +100,13 @@ public:
     Slab<TestSlabRecord> slabs (N);
     TestSlabRecord *recs[N * 2];
 
-    for (int j = 0; j < N * 2; j++)
+    for (u_long j = 0; j < N * 2; j++)
       {
         recs[j] = slabs.forcedGet ();
         CPPUNIT_ASSERT (recs[j]);
       }
 
-    for (int j = 0; j < N * 2; j++)
+    for (u_long j = 0; j < N * 2; j++)
       slabs.put (recs[j]);
   }
 



commit 506db9b0068fee4c8777fea6d953f13fe9c45858
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 16:18:41 2010 +0100

    Remove definition of SSL_LIB

diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index 50c7422..307a8f2 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -9,7 +9,7 @@ all : all-am math_sum.mscgi
 math_sum.mscgi : $(libmath_sum_a_OBJECTS) $(libmath_sum_a_DEPENDENCIES)
 	-rm -f math_sum.mscgi
 	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a \
-	 $(libmath_sum_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB)\
+	 $(libmath_sum_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB)\
 	 $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : math_sum.mscgi
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index e9bbe16..9821de1 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -9,7 +9,7 @@ all : all-am post.mscgi
 post.mscgi : $(libpost_a_OBJECTS) $(libpost_a_DEPENDENCIES)
 	-rm -f post.mscgi
 	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a \
-	 $(libpost_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB)\
+	 $(libpost_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB)\
 	 $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : post.mscgi
diff --git a/myserver/configure.ac b/myserver/configure.ac
index dfe5e19..eb4c55e 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -93,8 +93,6 @@ gl_INIT
 AC_CHECK_FUNCS(regcomp setgroups localtime_r posix_fallocate \
 		           openat fstatat getpwnam ffsl readdir_r)
 
-AC_CHECK_LIB(gcrypt, gcry_control)
-
 case "${host}" in
     *-*-mingw32*)
      LDFLAGS="-lwsock32 -lws2_32 -lgdi32 -lole32  -luuid -luserenv $LDFLAGS"
@@ -199,11 +197,12 @@ else
 	CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
 fi
 
-AC_CHECK_LIB(gnutls-openssl, main, have_ssl=yes)
+AC_CHECK_LIB(gpg-error, gpg_err_init)
+AC_CHECK_LIB(gcrypt, gcry_control)
+AC_CHECK_LIB(gnutls, main)
+AC_CHECK_LIB(gnutls-openssl, main)
 
-if test x_$have_ssl == x_yes; then
-   SSL_LIB="-lgnutls-openssl -lgnutls -lgcrypt -lgpg-error"
-else
+if test x$ac_cv_lib_gnutls_openssl_main != xyes; then
    AC_MSG_ERROR(Cannot find ssl libraries)
 fi
 
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index 6e65b3b..10ae987 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -7,7 +7,7 @@ myserver_SOURCES = myserver.cpp
 myserver_CXXFLAGS = $(CXXFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
 myserver_LDFLAGS =  -rdynamic
 myserver_LDADD = libmyserver.a $(PTHREAD_LIB) $(IDN_LIB) \
-	$(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) \
+	$(XNET_LIB) $(DL_LIB) $(ZLIB_LIB) \
 	$(XML_LIBS)  ../lib/libgnu.a $(LDFLAGS)
 
 clean-libmyserver.a:
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 441b048..98f7ad3 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -65,8 +65,8 @@ test_suite_SOURCES =  	main.cpp				\
 			test_xml_validator.cpp
 
 test_suite_LDADD = ../src/libmyserver.a  ../lib/libgnu.a $(CPPUNIT_LDFLAGS) \
-	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) \
-	$(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS)
+	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB) \
+	$(XML_LIBS)  $(LDFLAGS)
 
 install:
 



commit 6a5c898f27b342c6cbcccf8bb394396aa92e8535
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 15:47:21 2010 +0100

    CFLAGS doesn't force gnulib directory inclusion, CXXFLAGS still does.

diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index b68d923..50c7422 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -5,13 +5,12 @@ libmath_sum_a_SOURCES = math_sum.cpp
 all : all-am math_sum.mscgi
 	cp math_sum.mscgi ../../cgi-bin/
 
-libmath_sum.a :
 
 math_sum.mscgi : $(libmath_sum_a_OBJECTS) $(libmath_sum_a_DEPENDENCIES)
 	-rm -f math_sum.mscgi
-	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a  $(libmath_sum_a_LIBADD) \
-	$(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi \
-	-shared $(CXXFLAGS) $(XML_CFLAGS)
+	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a \
+	 $(libmath_sum_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB)\
+	 $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : math_sum.mscgi
 	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi'
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index 0f10994..e9bbe16 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -5,18 +5,17 @@ libpost_a_SOURCES = post.cpp
 all : all-am post.mscgi
 	cp post.mscgi ../../cgi-bin/
 
-libpost.a :
-
 
 post.mscgi : $(libpost_a_OBJECTS) $(libpost_a_DEPENDENCIES)
 	-rm -f post.mscgi
-	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a ../../../../lib/libgnu.a $(libpost_a_LIBADD) \
-	$(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) \
-	-o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a \
+	 $(libpost_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB)\
+	 $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : post.mscgi
 	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi'
 
+
 clean-local:
 	rm -f post.mscgi
 	rm -f *.o
diff --git a/myserver/configure.ac b/myserver/configure.ac
index d352dee..dfe5e19 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -99,6 +99,7 @@ case "${host}" in
     *-*-mingw32*)
      LDFLAGS="-lwsock32 -lws2_32 -lgdi32 -lole32  -luuid -luserenv $LDFLAGS"
      MAKE_MSCGI=yes
+     LTCFLAGS=""
      ;;
   *)
      dnl Looking for pthreads
@@ -201,7 +202,7 @@ fi
 AC_CHECK_LIB(gnutls-openssl, main, have_ssl=yes)
 
 if test x_$have_ssl == x_yes; then
-   SSL_LIB="-lgnutls-openssl"
+   SSL_LIB="-lgnutls-openssl -lgnutls -lgcrypt -lgpg-error"
 else
    AC_MSG_ERROR(Cannot find ssl libraries)
 fi
@@ -324,7 +325,8 @@ else
 fi
 
 LDFLAGS="$LDFLAGS $LIBS $pic_flag"
-CFLAGS="-I$(pwd)/lib $pic_flag $CFLAGS"
+CFLAGS="$pic_flag $CFLAGS"
+# FIXME: Define in every Makefile.am
 CXXFLAGS="-I$(pwd)/lib $pic_flag $CXXFLAGS"
 
 AC_SUBST(CFLAGS)
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index d1244c8..6e65b3b 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS = base conf connection connections_scheduler filter http_handler \
 AM_CPPFLAGS = $(all_includes)
 bin_PROGRAMS = myserver
 myserver_SOURCES = myserver.cpp
-myserver_CXXFLAGS = $(CXXFLAGS) $(XML_CFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
+myserver_CXXFLAGS = $(CXXFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
 myserver_LDFLAGS =  -rdynamic
 myserver_LDADD = libmyserver.a $(PTHREAD_LIB) $(IDN_LIB) \
 	$(XNET_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) \



commit e7313d7c92e16be37e7386eef8c46da0e485dd9f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 13:12:04 2010 +0100

    Use LT_INIT to initialize libtool and autoupdate

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 60135dd..d352dee 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -16,10 +16,10 @@ dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([GNU MyServer], m4_esyscmd([cat version]), [bug-myserver@gnu.org])
-AC_PREREQ([2.61])
+AC_INIT([GNU MyServer],[m4_esyscmd(cat version)],[bug-myserver@gnu.org])
+AC_PREREQ(2.65)
 AC_CONFIG_AUX_DIR([build-aux])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
 CFLAGS="${CFLAGS=}"
 CXXFLAGS="${CXXFLAGS=}"
 LDFLAGS="${LDFLAGS=}"
@@ -37,18 +37,18 @@ AC_PROG_CXX
 
 gl_EARLY
 
-AC_AIX
-AC_ISC_POSIX
-AC_MINIX
+AC_USE_SYSTEM_EXTENSIONS
+AC_SEARCH_LIBS([strerror],[cposix])
+AC_USE_SYSTEM_EXTENSIONS
 AC_HEADER_STDC
 AM_PROG_LEX
 AC_PROG_YACC
 AC_C_BIGENDIAN
-AC_PROG_RANLIB
-AC_PROG_LIBTOOL
+LT_INIT
 
 AC_DEFINE([WINVER], [0x0501], [WINVER])
-AC_LIBTOOL_WIN32_DLL
+
+LT_INIT
 
 AC_CANONICAL_HOST
 
@@ -237,7 +237,7 @@ AC_SUBST(SSL_LIB)
 if test x$enable_ipv6 = xyes; then
     dnl Check for IPv6
     AC_MSG_CHECKING([for IPv6])
-    AC_TRY_RUN([ /* AF_INET6 available check */
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 available check */
     #include <sys/types.h>
     #include <sys/socket.h>
     main()
@@ -247,23 +247,20 @@ if test x$enable_ipv6 = xyes; then
      else
        exit(0);
     }
-    ],
-    [ AC_MSG_RESULT(yes)
+    ]])],[ AC_MSG_RESULT(yes)
       AC_DEFINE(HAVE_IPV6, 1, [Enable IPv6 support])
-    ],
-    [ AC_MSG_RESULT(no)
+    ],[ AC_MSG_RESULT(no)
       AC_DEFINE(HAVE_IPV6, 0, [Disable IPv6 support])
       AC_MSG_ERROR([
 *** Cannot enable IPv6 support
 ])
-    ],
-    [ AC_MSG_RESULT(no)
+    ],[ AC_MSG_RESULT(no)
       AC_DEFINE(HAVE_IPV6, 0, [Disable IPv6 support])
       AC_MSG_ERROR([
 *** Cannot enable IPv6 support
 ])
-    ]
-    )
+    
+    ])
 else
     AC_DEFINE(HAVE_IPV6, 0, [Disable IPv6 support])
 fi
@@ -326,11 +323,9 @@ else
   MAKE_GUI=no
 fi
 
-CFLAGS="$CFLAGS $pic_flag"
-CXXFLAGS="$CXXFLAGS $pic_flag"
 LDFLAGS="$LDFLAGS $LIBS $pic_flag"
-CFLAGS="-I$(pwd)/lib -I$(pwd)/lib $CFLAGS"
-CXXFLAGS="-I$(pwd)/lib -I$(pwd)/lib $CXXFLAGS"
+CFLAGS="-I$(pwd)/lib $pic_flag $CFLAGS"
+CXXFLAGS="-I$(pwd)/lib $pic_flag $CXXFLAGS"
 
 AC_SUBST(CFLAGS)
 AC_SUBST(CXXFLAGS)

-----------------------------------------------------------------------

Summary of changes:
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |    7 +--
 myserver/binaries/web/cgi-src/post/Makefile.am     |    9 ++--
 myserver/configure.ac                              |   52 +++++++++-----------
 myserver/include/base/slab/slab.h                  |    2 +-
 myserver/include/base/socket/socket.h              |    3 -
 myserver/include/protocol/ftp/ftp.h                |    2 -
 myserver/myserver.h                                |    8 ---
 myserver/src/Makefile.am                           |    4 +-
 myserver/src/base/bitvec/bitvec.cpp                |   16 +++---
 myserver/src/base/file/file.cpp                    |    6 +--
 myserver/src/base/file/files_utility.cpp           |    5 +--
 myserver/src/base/process/fork_server.cpp          |    8 ++--
 myserver/src/base/process/process.cpp              |    6 +-
 .../src/base/process/process_server_manager.cpp    |    3 +-
 myserver/src/conf/security/xml_validator.cpp       |    4 +-
 myserver/src/connection/connection.cpp             |    4 --
 .../src/connections_scheduler/listen_threads.cpp   |    4 +-
 myserver/src/filter/gzip/gzip.cpp                  |    2 +
 myserver/src/http_handler/cgi/cgi.cpp              |    1 -
 myserver/src/http_handler/http_file/http_file.cpp  |   24 ++++-----
 myserver/src/http_handler/proxy/proxy.cpp          |    9 ++--
 myserver/src/http_handler/scgi/scgi.cpp            |    2 +-
 myserver/src/plugin/plugins_manager.cpp            |    2 +-
 myserver/src/protocol/control/control_protocol.cpp |    1 -
 myserver/src/protocol/ftp/ftp.cpp                  |   44 ++++++++--------
 myserver/src/protocol/ftp/ftp_lexer.cpp            |    7 +++
 myserver/src/protocol/gopher/engine.cpp            |    1 -
 myserver/src/protocol/gopher/gopher.cpp            |    4 +-
 myserver/src/protocol/gopher/gopher_content.cpp    |    3 +-
 myserver/src/protocol/http/http.cpp                |   11 ++--
 myserver/src/server/server.cpp                     |   13 ++---
 myserver/tests/Makefile.am                         |    4 +-
 myserver/tests/test_slab.cpp                       |    8 ++--
 33 files changed, 125 insertions(+), 154 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 10 11:52:56 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NfFo8-0007Uh-Rm
	for mharc-myserver-commit@gnu.org; Wed, 10 Feb 2010 11:52:56 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NfFo7-0007UT-IA
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:52:55 -0500
Received: from [199.232.76.173] (port=35262 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NfFo7-0007U2-6z
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:52:55 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1NfFnz-00045t-Mj
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:52:54 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:57758
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1NfFny-00045l-JP
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 11:52:46 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NfFny-0003Hi-2p
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 16:52:46 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NfFnx-0006Mf-8k
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 16:52:46 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 38827a01d9360f56ba99e0e866985883506a4d78
X-Git-Newrev: c52b13aca2ca45c61144b3aa3b58587838496118
Message-Id: <E1NfFnx-0006Mf-8k@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 10 Feb 2010 16:52:45 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-57-gc52b13a
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Feb 2010 16:52:55 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  c52b13aca2ca45c61144b3aa3b58587838496118 (commit)
       via  9968a9eb67a41d011ff553b2afa009a99a5a36c7 (commit)
      from  38827a01d9360f56ba99e0e866985883506a4d78 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit c52b13aca2ca45c61144b3aa3b58587838496118
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 17:51:11 2010 +0100

    Use SHUT_RDWR in place of SD_BOTH

diff --git a/myserver/src/connection/connection.cpp b/myserver/src/connection/connection.cpp
index ebee461..dc3d1b6 100644
--- a/myserver/src/connection/connection.cpp
+++ b/myserver/src/connection/connection.cpp
@@ -52,7 +52,7 @@ void Connection::destroy ()
 {
   if (socket)
   {
-    socket->shutdown (SD_BOTH);
+    socket->shutdown (SHUT_RDWR);
     socket->close ();
     delete socket;
     socket = NULL;
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index 43fe9b1..0185ba6 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -440,7 +440,7 @@ int ListenThreads::terminate ()
           if (!serverSocket)
             continue;
 
-          serverSocket->shutdown (SD_BOTH);
+          serverSocket->shutdown (SHUT_RDWR);
           do
             {
               err = serverSocket->recv (buffer, 256, 0);
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 93b60be..4fb2589 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -163,7 +163,7 @@ int FtpuserData::closeDataConnection ()
 
   if (m_pDataConnection != NULL && m_pDataConnection->socket != NULL)
     {
-      m_pDataConnection->socket->shutdown (SD_BOTH);
+      m_pDataConnection->socket->shutdown (SHUT_RDWR);
       m_pDataConnection->socket->close ();
       delete m_pDataConnection->socket;
       m_pDataConnection->socket = NULL;
@@ -546,7 +546,7 @@ void Ftp::pasv ()
       if (asock->getHandle () < 0)
         return;
 
-      pFtpuserData->m_pDataConnection->socket->shutdown (SD_BOTH);
+      pFtpuserData->m_pDataConnection->socket->shutdown (SHUT_RDWR);
       pFtpuserData->m_pDataConnection->socket->close ();
       delete pFtpuserData->m_pDataConnection->socket;
       pFtpuserData->m_pDataConnection->socket = asock;



commit 9968a9eb67a41d011ff553b2afa009a99a5a36c7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 17:50:49 2010 +0100

    Fix more compiler warnings

diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index cd15885..fd5266f 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -80,7 +80,6 @@ public:
   {
     ThreadID tid;
     int optvalReuseAddr = 1;
-    char host[] = "localhost";
     int port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
@@ -164,11 +163,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION (TestSocket);
 static DEFINE_THREAD (testRecvClient, pParam)
 {
   Socket *obj2 = new Socket;
-
-  int optvalReuseAddr = 1;
   char host[] = "localhost";
   int port = *((int*)pParam);
-  int status;
 
   CPPUNIT_ASSERT (obj2->socket (AF_INET, SOCK_STREAM, 0) != -1);
 
@@ -184,10 +180,11 @@ static DEFINE_THREAD (testRecvClient, pParam)
   /* To sync.  */
   CPPUNIT_ASSERT (obj2->recv (buf, bufLen, 0, MYSERVER_SEC (5)) != -1);
 
-  CPPUNIT_ASSERT (obj2->shutdown (SD_BOTH) != -1);
+  CPPUNIT_ASSERT (obj2->shutdown (SHUT_RDWR) != -1);
 
   CPPUNIT_ASSERT (obj2->close () != -1);
 
   delete obj2;
   obj2 = NULL;
+  return 0;
 }
diff --git a/myserver/tests/test_socket_pair.cpp b/myserver/tests/test_socket_pair.cpp
index 90e0141..0c2b740 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -75,7 +75,7 @@ public:
     string fname;
     u_long nbw;
 
-    for (int i = 0; i < bsize; i++)
+    for (u_long i = 0; i < bsize; i++)
       {
         inputBuffer[i] = '\0';
         outputBuffer[i] = i + 1;
@@ -95,7 +95,7 @@ public:
     inverted.read (inputBuffer, bsize, &nbr);
     CPPUNIT_ASSERT_EQUAL (nbr, bsize);
 
-    for (int i = 0; i < bsize; i++)
+    for (u_long i = 0; i < bsize; i++)
       CPPUNIT_ASSERT_EQUAL (inputBuffer[i], outputBuffer[i]);
 
     file.close ();
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 700e39c..85e15c3 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -128,7 +128,6 @@ public:
     ThreadID tid;
 
     int optvalReuseAddr = 1;
-    char host[] = "localhost";
     int port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
@@ -211,10 +210,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION (TestSslSocket);
 static DEFINE_THREAD (testSslRecvClient, pParam)
 {
   SslSocket *sslClient = NULL;
-  int optvalReuseAddr = 1;
-  char host[] = "localhost";
   int port = *((int*)pParam);
-  int cstatus = 0;
   MYSERVER_SOCKADDRIN sockIn = { 0 };
 
   ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index 7bdfe98..0ce109a 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -119,15 +119,13 @@ public:
     UnixSocketServerType data;
     data.socket = sock;
     data.result = false;
-
-    int ret;
     string path;
     FilesUtility::temporaryFileName (0, path);
     sock->socket ();
     sock->bind (path.c_str ());
     CPPUNIT_ASSERT_EQUAL (sock->listen (1), 0);
 
-    int res = Thread::create (&tid, test_unix_socket_server, &data);
+    Thread::create (&tid, test_unix_socket_server, &data);
 
     UnixSocket client;
     client.socket ();

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/connection/connection.cpp             |    2 +-
 .../src/connections_scheduler/listen_threads.cpp   |    2 +-
 myserver/src/protocol/ftp/ftp.cpp                  |    4 ++--
 myserver/tests/test_socket.cpp                     |    7 ++-----
 myserver/tests/test_socket_pair.cpp                |    4 ++--
 myserver/tests/test_ssl_socket.cpp                 |    4 ----
 myserver/tests/test_unix_socket.cpp                |    4 +---
 7 files changed, 9 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 10 17:49:32 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NfLNE-0008Lj-19
	for mharc-myserver-commit@gnu.org; Wed, 10 Feb 2010 17:49:32 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NfLND-0008Kp-07
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 17:49:31 -0500
Received: from [199.232.76.173] (port=55250 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NfLNC-0008KB-Ej
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 17:49:30 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <gscrivano@gnu.org>) id 1NfLN8-00005o-4T
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 17:49:30 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:42403
	helo=internal.in.savannah.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1NfLN7-00005a-KX
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 17:49:25 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NfLN7-0007a7-5X
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 22:49:25 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NfLN6-0002oj-Tn
	for myserver-commit@gnu.org; Wed, 10 Feb 2010 22:49:25 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c52b13aca2ca45c61144b3aa3b58587838496118
X-Git-Newrev: 2148d400ca19fc5db7f71ddc3876cbe9b5a80774
Message-Id: <E1NfLN6-0002oj-Tn@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 10 Feb 2010 22:49:24 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-61-g2148d40
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Feb 2010 22:49:31 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  2148d400ca19fc5db7f71ddc3876cbe9b5a80774 (commit)
       via  494b37b8e113e4f848cfd2329a03516810b6a604 (commit)
       via  e4d4e6b0d06a6427d42ecade59cc807747a38f7f (commit)
       via  9e3b8dec0ca55ede7737acf090ebf4b903b140b7 (commit)
      from  c52b13aca2ca45c61144b3aa3b58587838496118 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 2148d400ca19fc5db7f71ddc3876cbe9b5a80774
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 23:32:15 2010 +0100

    Specify the gettext library to the linker.

diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index 307a8f2..e29729d 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -10,7 +10,7 @@ math_sum.mscgi : $(libmath_sum_a_OBJECTS) $(libmath_sum_a_DEPENDENCIES)
 	-rm -f math_sum.mscgi
 	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a \
 	 $(libmath_sum_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB)\
-	 $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	 $(XML_LIBS) $(INTLLIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : math_sum.mscgi
 	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi'
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index 9821de1..ee1f50b 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -10,7 +10,7 @@ post.mscgi : $(libpost_a_OBJECTS) $(libpost_a_DEPENDENCIES)
 	-rm -f post.mscgi
 	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a \
 	 $(libpost_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB)\
-	 $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	 $(XML_LIBS) $(INTLLIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : post.mscgi
 	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi'
diff --git a/myserver/lib/Makefile.am b/myserver/lib/Makefile.am
index 03c83fb..4063aae 100644
--- a/myserver/lib/Makefile.am
+++ b/myserver/lib/Makefile.am
@@ -33,7 +33,3 @@ GNULIB_SHUTDOWN=1
 GNULIB_ACCEPT4=1
 
 include gnulib.mk
-
-# Dirty hack.  FIXME!
-all-local: libgnu.la
-	cp .libs/libgnu.a .
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index 10ae987..3287ef7 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -8,7 +8,7 @@ myserver_CXXFLAGS = $(CXXFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
 myserver_LDFLAGS =  -rdynamic
 myserver_LDADD = libmyserver.a $(PTHREAD_LIB) $(IDN_LIB) \
 	$(XNET_LIB) $(DL_LIB) $(ZLIB_LIB) \
-	$(XML_LIBS)  ../lib/libgnu.a $(LDFLAGS)
+	$(XML_LIBS)  ../lib/libgnu.a $(INTLLIBS) $(LDFLAGS)
 
 clean-libmyserver.a:
 	rm -f libmyserver.a
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 98f7ad3..31ac38e 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -66,7 +66,7 @@ test_suite_SOURCES =  	main.cpp				\
 
 test_suite_LDADD = ../src/libmyserver.a  ../lib/libgnu.a $(CPPUNIT_LDFLAGS) \
 	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB) \
-	$(XML_LIBS)  $(LDFLAGS)
+	$(XML_LIBS) $(INTLLIBS) $(LDFLAGS)
 
 install:
 



commit 494b37b8e113e4f848cfd2329a03516810b6a604
Merge: e4d4e6b c52b13a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 19:21:10 2010 +0100

    Merge branch 'master' of file:///home/gscrivano/myserver/myserver




commit e4d4e6b0d06a6427d42ecade59cc807747a38f7f
Merge: 9e3b8de 43a210f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 19:20:25 2010 +0100

    Merge branch 'master' of file:///home/gscrivano/myserver/myserver




commit 9e3b8dec0ca55ede7737acf090ebf4b903b140b7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 10 01:00:19 2010 +0100

    Remove legacy code for files handling.  Use new gnulib modules.

diff --git a/myserver/bootstrap.conf b/myserver/bootstrap.conf
index 9741cc5..02a2797 100644
--- a/myserver/bootstrap.conf
+++ b/myserver/bootstrap.conf
@@ -27,9 +27,11 @@ accept
 argp
 bind
 chdir-long
+close
 crypto/md5
 crypto/sha1
 connect
+fsync
 getcwd
 gethostname
 getsockname
@@ -40,9 +42,14 @@ listen
 malloc
 mktime
 nproc
+open
 pipe
+read-file
+readlink
 recv
 regex
+remove
+rename
 select
 send
 setsockopt
@@ -51,6 +58,7 @@ snprintf
 socket
 sysexits
 unlink
+write
 "
 
 gnulib_extra_files="
diff --git a/myserver/include/base/hash_map/hash_map.h b/myserver/include/base/hash_map/hash_map.h
index ddecd19..cac8a13 100644
--- a/myserver/include/base/hash_map/hash_map.h
+++ b/myserver/include/base/hash_map/hash_map.h
@@ -30,6 +30,8 @@
 # include <vector>
 # include <string>
 
+# undef remove
+
 using namespace std;
 
 //hashmap Hash-Key-Value Struct
diff --git a/myserver/include/connections_scheduler/connections_scheduler.h b/myserver/include/connections_scheduler/connections_scheduler.h
index fb900cd..6e79569 100644
--- a/myserver/include/connections_scheduler/connections_scheduler.h
+++ b/myserver/include/connections_scheduler/connections_scheduler.h
@@ -29,6 +29,8 @@
 # include <include/base/thread/thread.h>
 # include <include/base/socket_pair/socket_pair.h>
 
+# undef remove
+
 # include <list>
 # include <queue>
 
diff --git a/myserver/include/filter/stream.h b/myserver/include/filter/stream.h
index 3c03800..e56289c 100644
--- a/myserver/include/filter/stream.h
+++ b/myserver/include/filter/stream.h
@@ -28,11 +28,7 @@ typedef u_int Handle;
 typedef int Handle;
 # endif
 
-# ifdef WIN32
-typedef HANDLE FileHandle;
-# else
 typedef int FileHandle;
-# endif
 
 /*!
  *Abstract class to handle virtual data streams.
diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index a66f807..99cca17 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -34,6 +34,8 @@
 
 using namespace std;
 
+# undef remove
+
 class LogManager
 {
 public:
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 3af69b1..53a62ee 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -22,34 +22,30 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/string/stringutils.h>
 #include <include/base/file/files_utility.h>
 
-#ifndef WIN32
 extern "C"
 {
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <errno.h>
-# include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <time.h>
+
+#ifdef SENDFILE
 # include <fcntl.h>
 # include <stdlib.h>
-# include <string.h>
-# include <math.h>
-# include <time.h>
-
-# ifdef SENDFILE
-#  include <fcntl.h>
-#  include <stdlib.h>
-#  include <stdio.h>
-#  include <sys/sendfile.h>
-#  include <sys/stat.h>
-#  include <sys/types.h>
-#  include <unistd.h>
-# endif
-
-
-}
+# include <stdio.h>
+# include <sys/sendfile.h>
+# include <sys/stat.h>
+# include <sys/types.h>
+# include <unistd.h>
 #endif
+}
 
 #include <string>
 #include <sstream>
@@ -100,13 +96,9 @@ int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
     *nbw = 0;
     return 1;
   }
-#ifdef WIN32
-  int ret = WriteFile (handle, buffer, buffersize, nbw, NULL);
-  return (!ret);
-#else
-  *nbw =  ::write (handle, buffer, buffersize);
+
+  *nbw = ::write (handle, buffer, buffersize);
   return (*nbw == buffersize) ? 0 : 1 ;
-#endif
 }
 
 /*!
@@ -115,7 +107,7 @@ int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
  *\param opt Specify how open the file.
  */
 File::File (char *nfilename, int opt)
-  : handle ((FileHandle)-1)
+  : handle ((FileHandle) -1)
 {
   openFile (nfilename, opt);
 }
@@ -126,18 +118,11 @@ File::File (char *nfilename, int opt)
  */
 int File::truncate (u_long size)
 {
-#ifdef WIN32
-  if (seek (size))
-    return 1;
-
-  return !SetEndOfFile (handle);
-#else
   int err = ftruncate (handle, size);
   if (err)
     return err;
 
   return seek (size);
-#endif
 }
 
 /*!
@@ -150,72 +135,12 @@ int File::truncate (u_long size)
 int File::openFile (const char* nfilename,u_long opt)
 {
   long ret = 0;
-
-  filename.assign (nfilename);
-#ifdef WIN32
-  u_long creationFlag = 0;
-  u_long openFlag = 0;
-  u_long attributeFlag = 0;
-  SECURITY_ATTRIBUTES sa = {0};
-  sa.nLength = sizeof (sa);
-
-  if (opt & File::NO_INHERIT)
-    sa.bInheritHandle = FALSE;
-  else
-    sa.bInheritHandle = TRUE;
-
-  sa.lpSecurityDescriptor = NULL;
-
-  if (opt & File::FILE_OPEN_ALWAYS)
-    creationFlag |= OPEN_ALWAYS;
-  if (opt & File::OPEN_IF_EXISTS)
-    creationFlag |= OPEN_EXISTING;
-  if (opt & File::FILE_CREATE_ALWAYS)
-    creationFlag |= CREATE_ALWAYS;
-
-  if (opt & File::READ)
-    openFlag |= GENERIC_READ;
-  if (opt & File::WRITE)
-    openFlag |= GENERIC_WRITE;
-
-  if (opt & File::TEMPORARY)
-  {
-    openFlag |= FILE_ATTRIBUTE_TEMPORARY;
-    attributeFlag |= FILE_FLAG_DELETE_ON_CLOSE;
-  }
-  if (opt & File::HIDDEN)
-    openFlag|= FILE_ATTRIBUTE_HIDDEN;
-
-  if (attributeFlag == 0)
-    attributeFlag = FILE_ATTRIBUTE_NORMAL;
-
-  handle = CreateFile (filename.c_str (), openFlag,
-                       FILE_SHARE_READ|FILE_SHARE_WRITE,
-                       &sa, creationFlag, attributeFlag, NULL);
-
-  if (handle == INVALID_HANDLE_VALUE)
-    {
-      filename.clear ();
-      return 1;
-    }
-  else
-    {
-      if (opt & File::APPEND)
-        ret = seek (getFileSize ());
-      else
-        ret = seek (0);
-
-      if (ret)
-        {
-          close ();
-          filename.clear ();
-          return 1;
-        }
-    }
-#else
   struct stat fStats;
   int flags;
 
+
+  filename.assign (nfilename);
+
   if ((opt & File::READ) && (opt & File::WRITE))
     flags = O_RDWR;
   else if (opt & File::READ)
@@ -244,9 +169,6 @@ int File::openFile (const char* nfilename,u_long opt)
     unlink (filename.c_str ()); /* It will be removed on close.  */
 
   return handle < 0;
-#endif
-
-  return 0;
 }
 
 /*!
@@ -320,18 +242,13 @@ int File::createTemporaryFile (const char* filename)
 int File::close ()
 {
   int ret = 0;
-  if (handle != (FileHandle) -1)
+  if (handle != -1)
     {
-#ifdef WIN32
-      ret = !FlushFileBuffers (handle);
-      ret |= !CloseHandle (handle);
-#else
       ret = fsync (handle);
       ret |= ::close (handle);
-#endif
-  }
+    }
   filename.clear ();
-  handle = (FileHandle) -1;
+  handle = -1;
   return ret;
 }
 
@@ -342,20 +259,12 @@ int File::close ()
 u_long File::getFileSize ()
 {
   u_long ret;
-#ifdef WIN32
-  ret = GetFileSize (handle, NULL);
-  if (ret != INVALID_FILE_SIZE)
-    return ret;
-  else
-    return (u_long)-1;
-#else
   struct stat fStats;
   ret = fstat (handle, &fStats);
   if (ret)
     return (u_long)(-1);
   else
     return fStats.st_size;
-#endif
 }
 
 /*!
@@ -365,13 +274,8 @@ u_long File::getFileSize ()
 int File::seek (u_long initialByte)
 {
   u_long ret;
-#ifdef WIN32
-  ret = SetFilePointer (handle, initialByte, NULL, FILE_BEGIN);
-  return (ret == INVALID_SET_FILE_POINTER) ? 1 : 0;
-#else
   ret = lseek (handle, initialByte, SEEK_SET);
   return (ret != initialByte ) ? 1 : 0;
-#endif
 }
 
 /*!
@@ -381,11 +285,7 @@ int File::seek (u_long initialByte)
  */
 u_long File::getSeek ()
 {
-#ifdef WIN32
-  return SetFilePointer (handle, 0, NULL, FILE_CURRENT);
-#else
   return lseek (handle, 0, SEEK_CUR);
-#endif
 }
 
 /*!
@@ -430,13 +330,9 @@ int File::write (const char* buffer, u_long len, u_long *nbw)
  */
 int File::read (char* buffer, u_long buffersize, u_long* nbr)
 {
-#ifdef WIN32
-  return !ReadFile (handle, buffer, buffersize, nbr, NULL);
-#else
   int ret  = ::read (handle, buffer, buffersize);
   *nbr = (u_long) ret;
   return (ret == -1);
-#endif
 }
 
 /*!
diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index 58c8d67..ca18a92 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -142,11 +142,7 @@ int FilesUtility::getPathRecursionLevel (const char* path)
  */
 int FilesUtility::renameFile (const char* before, const char* after)
 {
-#ifdef WIN32
-  return MoveFile (before, after) ? 0 : 1;
-#else
   return rename (before, after);
-#endif
 }
 
 /*!
@@ -157,9 +153,6 @@ int FilesUtility::renameFile (const char* before, const char* after)
  */
 int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
 {
-#ifdef WIN32
-  return CopyFile (src, dest, overwrite ? FALSE : TRUE) ? 0 : 1;
-#else
   File srcFile;
   File destFile;
   char buffer[4096];
@@ -181,7 +174,6 @@ int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
   destFile.close ();
 
   return ret;
-#endif
 }
 
 /*!
@@ -225,16 +217,11 @@ int FilesUtility::copyFile (File& src, File& dest)
 int FilesUtility::deleteFile (const char *filename)
 {
   int ret;
-#ifdef WIN32
-  ret = DeleteFile (filename);
-  if (ret)
-    return 0;
-#else
   ret = remove (filename);
 
   if (ret && errno == ENOENT)
     ret = 0;
-#endif
+
   return ret;
 }
 
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index aeed1fd..d360185 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -17,6 +17,8 @@
 
 #include "myserver.h"
 
+#undef remove
+
 #include <include/connections_scheduler/connections_scheduler.h>
 #include <include/server/server.h>
 
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index 104a389..e47baf1 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -16,6 +16,9 @@
 */
 
 #include "myserver.h"
+
+#undef remove
+
 #include <include/log/log_manager.h>
 #include <include/server/server.h>
 
diff --git a/myserver/tests/test_hashmap.cpp b/myserver/tests/test_hashmap.cpp
index c21c07e..ee17730 100644
--- a/myserver/tests/test_hashmap.cpp
+++ b/myserver/tests/test_hashmap.cpp
@@ -16,7 +16,11 @@
  */
 
 #include "myserver.h"
+
+#undef remove
+
 #include <include/base/hash_map/hash_map.h>
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
@@ -78,10 +82,8 @@ public:
     CPPUNIT_ASSERT_EQUAL (map->empty (), true);
     map->put ((char*)"key", 0);
     CPPUNIT_ASSERT_EQUAL (map->empty (), false);
-
   }
 
-
   void testPut ()
   {
     map->put ((char*)"one", 1);

-----------------------------------------------------------------------

Summary of changes:
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |    2 +-
 myserver/binaries/web/cgi-src/post/Makefile.am     |    2 +-
 myserver/lib/Makefile.am                           |    4 ----
 myserver/src/Makefile.am                           |    2 +-
 myserver/tests/Makefile.am                         |    2 +-
 5 files changed, 4 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 12 14:54:51 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ng1bG-0008Jy-TT
	for mharc-myserver-commit@gnu.org; Fri, 12 Feb 2010 14:54:50 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ng1bF-0008Je-SX
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 14:54:49 -0500
Received: from [140.186.70.92] (port=55667 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ng1bE-0008Iy-6E
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 14:54:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng1bC-0006YU-SS
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 14:54:48 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:38062
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng1bC-0006YQ-Ok
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 14:54:46 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng1bC-0007Cw-IR
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 19:54:46 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Ng1bB-0006w6-OI
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 19:54:46 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2148d400ca19fc5db7f71ddc3876cbe9b5a80774
X-Git-Newrev: 9287fdf621aff6e4577d1e84aadf4072b2046637
Message-Id: <E1Ng1bB-0006w6-OI@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 12 Feb 2010 19:54:45 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-69-g9287fdf
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Feb 2010 19:54:50 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  9287fdf621aff6e4577d1e84aadf4072b2046637 (commit)
       via  5345982311f624066a23a655c24ef8c233e3d0b5 (commit)
       via  5b63d762e026186b1dcfc941dd833f79f4803d7b (commit)
       via  edede90cc9f76b1992ebd135f96676c408bcf673 (commit)
       via  267d591bec470c6bfed07147d5ffa46781f97a8a (commit)
       via  c0020d0f554fa509407e22a72940d252973dae44 (commit)
       via  ceebd4fa089f48852069da8d7e2ccfc334281ee8 (commit)
       via  7cf87777d70d0ba8298f29eff5e00918b2692c69 (commit)
      from  2148d400ca19fc5db7f71ddc3876cbe9b5a80774 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 9287fdf621aff6e4577d1e84aadf4072b2046637
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 20:55:27 2010 +0100

    FD_TO_SOCKET/SOCKET_TO_FD are defined only on WIN32

diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index de6a3e5..3c4aba0 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -25,16 +25,16 @@ extern "C"
 {
 #include <string.h>
 #include <stdio.h>
-# include <sys/types.h>
-# include <sys/socket.h>
-# include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
 #ifdef WIN32
 # include <w32sock.h>
 #else
-# include <netdb.h>
-# include <unistd.h>
-# include <netinet/in.h>
-# include <arpa/inet.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
 #endif
 }
 
@@ -146,7 +146,13 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
       sslContext = 0;
       return -1;
     }
+
+#ifdef WIN32
   SSL_set_fd (sslConnection, FD_TO_SOCKET (fd));
+#else
+  SSL_set_fd (sslConnection, fd);
+#endif
+
   if (SSL_connect (sslConnection) < 0)
     {
       SSL_CTX_free (sslContext);
@@ -217,7 +223,11 @@ int SslSocket::sslAccept ()
       return -1;
     }
 
+#ifdef WIN32
   if (SSL_set_fd (sslConnection, FD_TO_SOCKET (fd)) == 0)
+#else
+  if (SSL_set_fd (sslConnection, fd) == 0)
+#endif
     {
       shutdown (2);
       freeSSL ();
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 0d7f821..0805f4f 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -19,7 +19,12 @@
 
 #undef remove
 
-#include <w32sock.h>
+#ifdef WIN32
+extern "C"
+{
+# include <w32sock.h>
+}
+#endif
 
 #include <include/connections_scheduler/connections_scheduler.h>
 #include <include/server/server.h>
@@ -125,8 +130,14 @@ static void eventLoopHandler (int fd, short event, void *arg)
               da->socketPair.read ((char*) &handle, sizeof (SocketHandle), &nbr);
               da->socketPair.read ((char*) &c, sizeof (ConnectionPtr), &nbr);
               da->socketPair.read ((char*) &tv, sizeof (timeval), &nbr);
-              event_once (FD_TO_SOCKET (handle), EV_READ | EV_TIMEOUT,
-                          newDataHandler, da, &tv);
+
+              event_once (
+#ifdef WIN32
+              FD_TO_SOCKET (handle), 
+#else
+              handle,
+#endif
+              EV_READ | EV_TIMEOUT, newDataHandler, da, &tv);
               break;
 
             case 'l':
@@ -185,8 +196,13 @@ void ConnectionsScheduler::listener (ConnectionsScheduler::ListenerArg *la)
 {
   ConnectionsScheduler::ListenerArg *arg = new ConnectionsScheduler::ListenerArg (la);
 
-  event_set (&(arg->ev), FD_TO_SOCKET (la->serverSocket->getHandle ()),
-             EV_READ | EV_TIMEOUT, listenerHandler, arg);
+    event_set (&(arg->ev),
+#ifdef WIN32
+              FD_TO_SOCKET (la->serverSocket->getHandle ()),
+#else
+              la->serverSocket->getHandle (),
+#endif
+              EV_READ | EV_TIMEOUT, listenerHandler, arg);
 
   arg->terminate = &dispatcherArg.terminate;
   arg->scheduler = this;
@@ -301,7 +317,11 @@ void ConnectionsScheduler::initialize ()
   dispatcherArg.socketPairWrite.setHandle (dispatcherArg.socketPair.getSecondHandle ());
 
   event_set (&(dispatcherArg.loopEvent),
+#ifdef WIN32
              FD_TO_SOCKET (dispatcherArg.socketPair.getFirstHandle ()),
+#else
+             dispatcherArg.socketPair.getFirstHandle (),
+#endif
              EV_READ | EV_TIMEOUT, eventLoopHandler, &dispatcherArg);
 
   event_add (&(dispatcherArg.loopEvent), NULL);
@@ -396,7 +416,12 @@ void ConnectionsScheduler::addWaitingConnectionImpl (ConnectionPtr c, int lock)
 {
   static timeval tv = {10, 0};
   int handle = c->socket->getHandle ();
-  SocketHandle socketHandle = FD_TO_SOCKET (handle);
+  SocketHandle socketHandle;
+#ifdef WIN32
+  socketHandle = FD_TO_SOCKET (handle);
+#else
+  socketHandle = handle;
+#endif
 
   if (server)
     tv.tv_sec = server->getTimeout () / 1000;
@@ -431,7 +456,13 @@ void ConnectionsScheduler::addWaitingConnectionImpl (ConnectionPtr c, int lock)
       eventsSocketMutex.unlock ();
     }
   else
-    event_once (FD_TO_SOCKET (handle), EV_READ | EV_TIMEOUT, newDataHandler,
+    event_once (
+#ifdef WIN32
+                FD_TO_SOCKET (handle),
+#else
+                handle,
+#endif
+                EV_READ | EV_TIMEOUT, newDataHandler,
                 &dispatcherArg, &tv);
 }
 



commit 5345982311f624066a23a655c24ef8c233e3d0b5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:58:31 2010 +0100

    Adjust includes

diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index 63257cd..a64207c 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -24,9 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 extern "C"
 {
-#include <sys/types.h>
-#include <sys/socket.h>
 #include <sys/ioctl.h>
+#include <errno.h>
 
 #ifndef WIN32
 # include <unistd.h>
@@ -34,9 +33,6 @@ extern "C"
 # include <netinet/in.h>
 # include <arpa/inet.h>
 #endif
-
-#include <sys/select.h>
-#include <errno.h>
 }
 
 #include <sstream>
@@ -535,7 +531,12 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
  */
 int Socket::recv (char* buffer, int len, int flags, u_long timeout)
 {
-  if (dataOnRead (timeout / 1000, timeout % 1000))
+  int ret = dataOnRead (timeout / 1000, timeout % 1000);
+
+  if (ret < 0)
+    return ret;
+
+  if (ret)
     return recv (buffer, len, flags);
 
   return 0;
@@ -661,7 +662,6 @@ int Socket::dataOnRead (int sec, int usec)
   FD_SET (fd, &readfds);
 
   ret = ::select (fd + 1, &readfds, NULL, NULL, &tv);
-
   if (ret <= 0)
     return 0;
 
diff --git a/myserver/src/base/thread/thread.cpp b/myserver/src/base/thread/thread.cpp
index 92dc491..f77e38e 100644
--- a/myserver/src/base/thread/thread.cpp
+++ b/myserver/src/base/thread/thread.cpp
@@ -76,11 +76,10 @@ int Thread::create (ThreadID*  ID, void * (*startRoutine)(void *),
 {
 #ifdef WIN32
   *ID = _beginthreadex (NULL, 0, startRoutine, arg, 0, NULL);
-
   return !(*ID);
 #endif
 #ifdef HAVE_PTHREAD
-  return pthread_create ((pthread_t*)ID, NULL, startRoutine, (void *)(arg));
+  return pthread_create ((pthread_t*) ID, NULL, startRoutine, (void *)(arg));
 #endif
 }
 



commit 5b63d762e026186b1dcfc941dd833f79f4803d7b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:45:00 2010 +0100

    Use the socket handle when calling gnutls functions.

diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index 75f95d8..de6a3e5 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -28,7 +28,9 @@ extern "C"
 # include <sys/types.h>
 # include <sys/socket.h>
 # include <sys/ioctl.h>
-#ifndef WIN32
+#ifdef WIN32
+# include <w32sock.h>
+#else
 # include <netdb.h>
 # include <unistd.h>
 # include <netinet/in.h>
@@ -46,6 +48,7 @@ using namespace std;
 SslSocket::SslSocket (Socket* sock) : Socket (sock)
 {
   this->sock = sock;
+  this->fd = sock->getHandle ();
   sslConnection = 0;
   sslContext = 0;
   clientCert = 0;
@@ -56,6 +59,7 @@ SslSocket::SslSocket (Socket* sock) : Socket (sock)
 SslSocket::SslSocket ()
 {
   this->sock = NULL;
+  this->fd = -1;
   sslConnection = 0;
   sslContext = 0;
   clientCert = 0;
@@ -100,8 +104,8 @@ int SslSocket::rawSend (const char* buffer, int len, int flags)
     {
       err = SSL_write (sslConnection, buffer, len);
     }while ((err <= 0) &&
-            (SSL_get_error (sslConnection,err) == SSL_ERROR_WANT_WRITE
-             || SSL_get_error (sslConnection,err) == SSL_ERROR_WANT_READ));
+            (SSL_get_error (sslConnection, err) == SSL_ERROR_WANT_WRITE
+             || SSL_get_error (sslConnection, err) == SSL_ERROR_WANT_READ));
   if (err <= 0)
     return -1;
   else
@@ -142,7 +146,7 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
       sslContext = 0;
       return -1;
     }
-  SSL_set_fd (sslConnection, fd);
+  SSL_set_fd (sslConnection, FD_TO_SOCKET (fd));
   if (SSL_connect (sslConnection) < 0)
     {
       SSL_CTX_free (sslContext);
@@ -194,16 +198,18 @@ SSL* SslSocket::getSSLConnection ()
 }
 
 /*!
- *SSL handshake procedure.
- *Return nonzero on errors.
+ * SSL handshake procedure.
+ * Return nonzero on errors.
  */
 int SslSocket::sslAccept ()
 {
   int sslAccept;
   if (sslContext == 0)
     return -1;
+
   if (sslConnection)
     freeSSL ();
+
   sslConnection = SSL_new (sslContext);
   if (sslConnection == 0)
     {
@@ -211,7 +217,7 @@ int SslSocket::sslAccept ()
       return -1;
     }
 
-  if (SSL_set_fd (sslConnection, fd) == 0)
+  if (SSL_set_fd (sslConnection, FD_TO_SOCKET (fd)) == 0)
     {
       shutdown (2);
       freeSSL ();
@@ -221,10 +227,11 @@ int SslSocket::sslAccept ()
   do
     {
       sslAccept = SSL_accept (sslConnection);
-    }while (sslAccept != 1
-            && SSL_get_error (sslConnection, sslAccept) == SSL_ERROR_WANT_READ);
+    }
+  while (sslAccept != 1
+         && SSL_get_error (sslConnection, sslAccept) == SSL_ERROR_WANT_READ);
 
-  if (sslAccept != 1 )
+  if (sslAccept != 1)
     {
       shutdown (2);
       freeSSL ();



commit edede90cc9f76b1992ebd135f96676c408bcf673
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:44:04 2010 +0100

    Use the socket handler as key for the connections map, not the fd.

diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index d360185..0d7f821 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -19,6 +19,8 @@
 
 #undef remove
 
+#include <w32sock.h>
+
 #include <include/connections_scheduler/connections_scheduler.h>
 #include <include/server/server.h>
 
@@ -62,7 +64,8 @@ static DEFINE_THREAD (dispatcher, p)
 
 static void newDataHandler (int fd, short event, void *param)
 {
-  ConnectionsScheduler::DispatcherArg* arg = (ConnectionsScheduler::DispatcherArg*) param;
+  ConnectionsScheduler::DispatcherArg* arg
+    = (ConnectionsScheduler::DispatcherArg*) param;
 
   if (!arg->terminate && arg->scheduler)
     arg->scheduler->newData (event, fd);
@@ -74,7 +77,7 @@ void ConnectionsScheduler::newData (short event, SocketHandle handle)
   ConnectionPtr connection = NULL;
 
   connectionsMutex.lock ();
-  connection = connections.get (handle);
+  connection = connections.get ((int) handle);
   connectionsMutex.unlock ();
 
   if (connection == NULL || server == NULL)
@@ -95,7 +98,8 @@ void ConnectionsScheduler::newData (short event, SocketHandle handle)
 
 static void eventLoopHandler (int fd, short event, void *arg)
 {
-  ConnectionsScheduler::DispatcherArg *da = (ConnectionsScheduler::DispatcherArg*)arg;
+  ConnectionsScheduler::DispatcherArg *da
+    = (ConnectionsScheduler::DispatcherArg*) arg;
   u_long nbr;
   timeval tv = {10, 0};
 
@@ -118,15 +122,16 @@ static void eventLoopHandler (int fd, short event, void *arg)
               SocketHandle handle;
               ConnectionPtr c;
 
-              da->socketPair.read ((char*)&handle, sizeof (SocketHandle), &nbr);
-              da->socketPair.read ((char*)&c, sizeof (ConnectionPtr), &nbr);
-              da->socketPair.read ((char*)&tv, sizeof (timeval), &nbr);
-              event_once (handle, EV_READ | EV_TIMEOUT, newDataHandler, da, &tv);
+              da->socketPair.read ((char*) &handle, sizeof (SocketHandle), &nbr);
+              da->socketPair.read ((char*) &c, sizeof (ConnectionPtr), &nbr);
+              da->socketPair.read ((char*) &tv, sizeof (timeval), &nbr);
+              event_once (FD_TO_SOCKET (handle), EV_READ | EV_TIMEOUT,
+                          newDataHandler, da, &tv);
               break;
 
             case 'l':
               ConnectionsScheduler::ListenerArg *arg;
-              da->socketPair.read ((char*)&arg, sizeof (arg), &nbr);
+              da->socketPair.read ((char*) &arg, sizeof (arg), &nbr);
               event_add (&(arg->ev), &tv);
               break;
 
@@ -145,7 +150,8 @@ static void eventLoopHandler (int fd, short event, void *arg)
 static void listenerHandler (int fd, short event, void *arg)
 {
   static timeval tv = {5, 0};
-  ConnectionsScheduler::ListenerArg* s = (ConnectionsScheduler::ListenerArg*)arg;
+  ConnectionsScheduler::ListenerArg* s
+    = (ConnectionsScheduler::ListenerArg*) arg;
 
   if (event == EV_READ)
     {
@@ -179,8 +185,8 @@ void ConnectionsScheduler::listener (ConnectionsScheduler::ListenerArg *la)
 {
   ConnectionsScheduler::ListenerArg *arg = new ConnectionsScheduler::ListenerArg (la);
 
-  event_set (&(arg->ev), (int) la->serverSocket->getHandle (), EV_READ | EV_TIMEOUT,
-             listenerHandler, arg);
+  event_set (&(arg->ev), FD_TO_SOCKET (la->serverSocket->getHandle ()),
+             EV_READ | EV_TIMEOUT, listenerHandler, arg);
 
   arg->terminate = &dispatcherArg.terminate;
   arg->scheduler = this;
@@ -193,7 +199,7 @@ void ConnectionsScheduler::listener (ConnectionsScheduler::ListenerArg *la)
   eventsSocketMutex.lock ();
   u_long nbw;
   dispatcherArg.socketPairWrite.write ("l", 1, &nbw);
-  dispatcherArg.socketPairWrite.write ((const char*)&arg, sizeof (arg), &nbw);
+  dispatcherArg.socketPairWrite.write ((const char*) &arg, sizeof (arg), &nbw);
   eventsSocketMutex.unlock ();
 }
 
@@ -294,7 +300,8 @@ void ConnectionsScheduler::initialize ()
 
   dispatcherArg.socketPairWrite.setHandle (dispatcherArg.socketPair.getSecondHandle ());
 
-  event_set (&(dispatcherArg.loopEvent), dispatcherArg.socketPair.getFirstHandle (),
+  event_set (&(dispatcherArg.loopEvent),
+             FD_TO_SOCKET (dispatcherArg.socketPair.getFirstHandle ()),
              EV_READ | EV_TIMEOUT, eventLoopHandler, &dispatcherArg);
 
   event_add (&(dispatcherArg.loopEvent), NULL);
@@ -388,7 +395,8 @@ void ConnectionsScheduler::addWaitingConnection (ConnectionPtr c)
 void ConnectionsScheduler::addWaitingConnectionImpl (ConnectionPtr c, int lock)
 {
   static timeval tv = {10, 0};
-  SocketHandle handle = c->socket ? (SocketHandle) c->socket->getHandle () : NULL;
+  int handle = c->socket->getHandle ();
+  SocketHandle socketHandle = FD_TO_SOCKET (handle);
 
   if (server)
     tv.tv_sec = server->getTimeout () / 1000;
@@ -398,7 +406,7 @@ void ConnectionsScheduler::addWaitingConnectionImpl (ConnectionPtr c, int lock)
   c->setScheduled (0);
 
   connectionsMutex.lock ();
-  connections.put (handle, c);
+  connections.put (socketHandle, c);
   connectionsMutex.unlock ();
 
   /*
@@ -413,17 +421,17 @@ void ConnectionsScheduler::addWaitingConnectionImpl (ConnectionPtr c, int lock)
       eventsSocketMutex.lock ();
 
       dispatcherArg.socketPairWrite.write ("c", 1, &nbw);
-      dispatcherArg.socketPairWrite.write ((const char*)&handle,
+      dispatcherArg.socketPairWrite.write ((const char*) &handle,
                                            sizeof (SocketHandle), &nbw);
-      dispatcherArg.socketPairWrite.write ((const char*)&c,
+      dispatcherArg.socketPairWrite.write ((const char*) &c,
                                            sizeof (ConnectionPtr), &nbw);
-      dispatcherArg.socketPairWrite.write ((const char*)&tv,
+      dispatcherArg.socketPairWrite.write ((const char*) &tv,
                                            sizeof (timeval), &nbw);
 
       eventsSocketMutex.unlock ();
     }
   else
-    event_once ((int)handle, EV_READ | EV_TIMEOUT, newDataHandler,
+    event_once (FD_TO_SOCKET (handle), EV_READ | EV_TIMEOUT, newDataHandler,
                 &dispatcherArg, &tv);
 }
 



commit 267d591bec470c6bfed07147d5ffa46781f97a8a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:42:15 2010 +0100

    Include <sys/select.h>

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index 34dde60..b571a40 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -27,6 +27,7 @@
 extern "C"
 {
 # include <sys/types.h>
+# include <sys/select.h>
 # include <sys/socket.h>
 }
 



commit c0020d0f554fa509407e22a72940d252973dae44
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:41:28 2010 +0100

    Avoid exceptions in threads but report them to the caller.

diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index fd5266f..c71ad70 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -40,6 +40,15 @@ using namespace std;
 
 static DEFINE_THREAD (testRecvClient, pParam);
 
+struct ThreadArg
+{
+  int port;
+  bool success;
+
+  /* This is valid only if !success.  */
+  exception reason;
+};
+
 class TestSocket : public CppUnit::TestFixture
 {
   Socket *obj;
@@ -80,27 +89,28 @@ public:
   {
     ThreadID tid;
     int optvalReuseAddr = 1;
-    int port = 6543;
+    ThreadArg arg;
+    arg.port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
 
     ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
     ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
-    ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
+    ((sockaddr_in*) (&sockIn))->sin_port = htons (arg.port);
 
     socklen_t sockInLen = sizeof (sockaddr_in);
 
     CPPUNIT_ASSERT (obj->socket (AF_INET, SOCK_STREAM, 0) != -1);
 
     CPPUNIT_ASSERT (obj->setsockopt (SOL_SOCKET, SO_REUSEADDR,
-                                      (const char*) &optvalReuseAddr,
-                                      sizeof (optvalReuseAddr)) != -1);
+                                     (const char*) &optvalReuseAddr,
+                                     sizeof (optvalReuseAddr)) != -1);
 
     /* If the port is used by another program, try a few others.  */
     if ((status = obj->bind (&sockIn, sockInLen)) != 0)
-      while (++port < 28000)
+      while (++arg.port < 28000)
         {
-          ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
+          ((sockaddr_in*) (&sockIn))->sin_port = htons (arg.port);
           if ((status = obj->bind (&sockIn, sockInLen)) == 0)
             break;
         }
@@ -109,18 +119,16 @@ public:
 
     CPPUNIT_ASSERT (obj->listen (1) != -1);
 
-    CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testRecvClient, &port), 0);
-
-    Thread::wait (MYSERVER_SEC (1));
+    CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testRecvClient, &arg), 0);
 
     CPPUNIT_ASSERT (obj->dataOnRead (5));
 
     Socket s = obj->accept (&sockIn, &sockInLen);
 
-    status = int (s.getHandle ());
+    status = (int) s.getHandle ();
 
     if (status < 0)
-      CPPUNIT_ASSERT (status != -1);
+      CPPUNIT_ASSERT (status);
 
     CPPUNIT_ASSERT (s.bytesToRead () >= 0);
 
@@ -133,9 +141,11 @@ public:
     s.send ("a", 1, 0);
 
     CPPUNIT_ASSERT (!strcmp (buf, "ehlo"));
-    CPPUNIT_ASSERT (status >= 0 || status == -2);
+    CPPUNIT_ASSERT (status >= 0);
 
     Thread::join (tid);
+    if (!arg.success)
+      throw arg.reason;
 
     CPPUNIT_ASSERT (obj->close () != -1);
   }
@@ -162,29 +172,48 @@ CPPUNIT_TEST_SUITE_REGISTRATION (TestSocket);
 
 static DEFINE_THREAD (testRecvClient, pParam)
 {
-  Socket *obj2 = new Socket;
-  char host[] = "localhost";
-  int port = *((int*)pParam);
-
-  CPPUNIT_ASSERT (obj2->socket (AF_INET, SOCK_STREAM, 0) != -1);
-
-  CPPUNIT_ASSERT (obj2->connect (host, port) != -1);
-
-  int bufLen = 8;
-  char buf[bufLen];
-  memset (buf, 0, bufLen);
-  strcpy (buf, "ehlo");
-
-  CPPUNIT_ASSERT (obj2->send (buf, strlen (buf), 0) != -1);
-
-  /* To sync.  */
-  CPPUNIT_ASSERT (obj2->recv (buf, bufLen, 0, MYSERVER_SEC (5)) != -1);
-
-  CPPUNIT_ASSERT (obj2->shutdown (SHUT_RDWR) != -1);
-
-  CPPUNIT_ASSERT (obj2->close () != -1);
-
-  delete obj2;
-  obj2 = NULL;
-  return 0;
+  ThreadArg *arg = (ThreadArg *) pParam;
+  arg->success = true;
+  try
+    {
+      int ret;
+      Socket *obj2 = new Socket;
+      char host[] = "localhost";
+
+      ret = obj2->socket (AF_INET, SOCK_STREAM, 0);
+      CPPUNIT_ASSERT (ret != -1);
+
+      ret = obj2->connect (host, arg->port);
+      CPPUNIT_ASSERT (ret != -1);
+
+      int bufLen = 8;
+      char buf[bufLen];
+      memset (buf, 0, bufLen);
+      strcpy (buf, "ehlo");
+
+      ret = obj2->send (buf, strlen (buf), 0);
+      CPPUNIT_ASSERT (ret != -1);
+
+      /* To sync.  */
+      ret = obj2->recv (buf, bufLen, 0, MYSERVER_SEC (5));
+      CPPUNIT_ASSERT (ret != -1);
+
+      ret = obj2->shutdown (SHUT_RDWR);
+      CPPUNIT_ASSERT (ret != -1);
+
+      ret = obj2->close ();
+      CPPUNIT_ASSERT (ret != -1);
+
+      delete obj2;
+      obj2 = NULL;
+      return 0;
+    }
+  catch (exception& e)
+    {
+      arg->success = false;
+      arg->reason = e;
+    }
+  catch (...)
+    {
+    }
 }
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 85e15c3..5a1ba0a 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -29,6 +29,7 @@
 #include "../include/base/file/file.h"
 #include "../include/base/file/files_utility.h"
 #include "../include/base/thread/thread.h"
+#include "../include/base/utility.h"
 
 extern "C"
 {
@@ -39,6 +40,7 @@ extern "C"
 #endif
 }
 
+#include <string>
 #include <iostream>
 using namespace std;
 
@@ -91,6 +93,15 @@ FX3J22wtVUi4Ve/XftYt6RJKd764o5WTdh/Z+RUbtusXnj3ygpI/G7fTzuPUj9uF\n\
 
 static DEFINE_THREAD (testSslRecvClient, pParam);
 
+struct SslThreadArg
+{
+  int port;
+  bool success;
+
+  /* This is valid only if !success.  */
+  exception reason;
+};
+
 class TestSslSocket : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE (TestSslSocket);
@@ -170,14 +181,18 @@ public:
 
     CPPUNIT_ASSERT (obj->listen (1) != -1);
 
-    CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testSslRecvClient, &port), 0);
+    SslThreadArg arg;
+    arg.port = port;
+    CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testSslRecvClient, &arg), 0);
+
+    Thread::wait (MYSERVER_SEC (1));
+
     Socket s = obj->accept (&sockIn, &sockInLen);
 
     sslObj = new SslSocket (&s);
     sslObj->setSSLContext (ctx);
 
     int ret = sslObj->sslAccept ();
-
     if (ret < 0)
     {
       delete obj;
@@ -200,6 +215,10 @@ public:
 
     SSL_CTX_free (ctx);
 
+    Thread::join (tid);
+    if (!arg.success)
+      throw arg.reason;
+
     delete obj;
     delete sslObj;
   }
@@ -210,28 +229,45 @@ CPPUNIT_TEST_SUITE_REGISTRATION (TestSslSocket);
 static DEFINE_THREAD (testSslRecvClient, pParam)
 {
   SslSocket *sslClient = NULL;
-  int port = *((int*)pParam);
+  int err;
+  SslThreadArg *arg = (SslThreadArg *) pParam;
   MYSERVER_SOCKADDRIN sockIn = { 0 };
 
   ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
   ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
-  ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
+  ((sockaddr_in*) (&sockIn))->sin_port = htons (arg->port);
 
   int sockInLen = sizeof (struct sockaddr_in);
 
+  arg->success = true;
+
   sslClient = new SslSocket ();
 
-  CPPUNIT_ASSERT (sslClient->socket (AF_INET, SOCK_STREAM, 0) != -1);
+  try
+    {
+      err = sslClient->socket (AF_INET, SOCK_STREAM, 0);
+      CPPUNIT_ASSERT (err != -1);
+
+      err = sslClient->connect (&sockIn, sockInLen);
+      CPPUNIT_ASSERT (err != -1);
 
-  CPPUNIT_ASSERT (sslClient->connect (&sockIn, sockInLen) != -1);
+      char buf[] = "Works?\n";
 
-  char buf[] = "Works?\n";
+      err = sslClient->send (buf, strlen (buf), 0);
+      sslClient->recv (buf, 1, 0);
 
-  int ret = sslClient->send (buf, strlen (buf), 0);
-  sslClient->recv (buf, 1, 0);
+      CPPUNIT_ASSERT (err != -1);
+      CPPUNIT_ASSERT (sslClient->close () != -1);
+      delete sslClient;
+    }
+  catch (exception& e)
+    {
+      arg->success = false;
+      arg->reason = e;
+    }
+  catch (...)
+    {
+    }
 
-  CPPUNIT_ASSERT (ret != -1);
-  CPPUNIT_ASSERT (sslClient->close () != -1);
-  delete sslClient;
   return 0;
 }
diff --git a/myserver/tests/test_thread.cpp b/myserver/tests/test_thread.cpp
index 8841163..b74b6eb 100644
--- a/myserver/tests/test_thread.cpp
+++ b/myserver/tests/test_thread.cpp
@@ -45,7 +45,7 @@ static DEFINE_THREAD (test_terminate_thread, pParam)
 
   Thread::terminate ();
 
-  //Should never be here.
+  /* Should never be here.  */
   *arg = 1;
 
   return NULL;



commit ceebd4fa089f48852069da8d7e2ccfc334281ee8
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:39:55 2010 +0100

    Use the mutex class when pthread is not available.

diff --git a/myserver/src/base/ssl/ssl.cpp b/myserver/src/base/ssl/ssl.cpp
index 674deeb..0a6dd3b 100644
--- a/myserver/src/base/ssl/ssl.cpp
+++ b/myserver/src/base/ssl/ssl.cpp
@@ -19,6 +19,7 @@
 
 #include <include/base/ssl/ssl.h>
 #include <include/base/file/files_utility.h>
+#include <include/base/sync/mutex.h>
 
 #include <string.h>
 
@@ -100,6 +101,42 @@ int SslContext::free ()
   return ret;
 }
 
+#if !HAVE_LIBGCRYPT || !HAVE_PTHREAD
+
+static int gcry_lock (void **mutex)
+{
+  return ((Mutex *) *mutex)->lock ();
+}
+
+static int gcry_unlock (void **mutex)
+{
+  return ((Mutex *) *mutex)->unlock ();
+}
+
+static int gcry_init (void **mutex)
+{
+  *mutex = new Mutex ();
+  return 0;
+}
+
+static int gcry_destroy (void **mutex)
+{
+  delete (Mutex *) *mutex;
+  return 0;
+}
+
+static struct gcry_thread_cbs myserver_gcry_cbs =
+  {
+    GCRY_THREAD_OPTION_USER,
+    NULL,
+    gcry_init,
+    gcry_destroy,
+    gcry_lock,
+    gcry_unlock
+  };
+
+#endif
+
 void initializeSSL ()
 {
   static bool initialized = false;
@@ -109,6 +146,9 @@ void initializeSSL ()
 #if HAVE_LIBGCRYPT && HAVE_PTHREAD
       gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
       gcry_control (GCRYCTL_INITIALIZATION_FINISHED);
+#else
+      gcry_control (GCRYCTL_SET_THREAD_CBS, &myserver_gcry_cbs);
+      gcry_control (GCRYCTL_INITIALIZATION_FINISHED);
 #endif
       gnutls_global_init ();
       initialized = true;



commit 7cf87777d70d0ba8298f29eff5e00918b2692c69
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 19:39:01 2010 +0100

    Use gnulib select

diff --git a/myserver/lib/Makefile.am b/myserver/lib/Makefile.am
index 4063aae..60c4d0d 100644
--- a/myserver/lib/Makefile.am
+++ b/myserver/lib/Makefile.am
@@ -26,6 +26,7 @@ GNULIB_GETSOCKOPT=1
 GNULIB_LISTEN=1
 GNULIB_RECV=1
 GNULIB_SEND=1
+GNULIB_SELECT=1
 GNULIB_RECVFROM=1
 GNULIB_SENDTO=1
 GNULIB_SETSOCKOPT=1

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/socket/socket.h              |    1 +
 myserver/lib/Makefile.am                           |    1 +
 myserver/src/base/socket/socket.cpp                |   14 ++--
 myserver/src/base/socket/ssl_socket.cpp            |   47 ++++++---
 myserver/src/base/ssl/ssl.cpp                      |   40 ++++++++
 myserver/src/base/thread/thread.cpp                |    3 +-
 .../connections_scheduler.cpp                      |   77 +++++++++++----
 myserver/tests/test_socket.cpp                     |  103 +++++++++++++-------
 myserver/tests/test_ssl_socket.cpp                 |   60 +++++++++---
 myserver/tests/test_thread.cpp                     |    2 +-
 10 files changed, 255 insertions(+), 93 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 12 17:13:08 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ng3l6-0007mE-Gn
	for mharc-myserver-commit@gnu.org; Fri, 12 Feb 2010 17:13:08 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ng3l4-0007m9-7e
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 17:13:06 -0500
Received: from [140.186.70.92] (port=32856 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ng3l2-0007ln-FL
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 17:13:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng3l1-0007bz-Ht
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 17:13:04 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:34532
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng3l1-0007bv-Dz
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 17:13:03 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng3l1-0000Rq-Ed
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 22:13:03 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Ng3l1-0001I9-Ae
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 22:13:03 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9287fdf621aff6e4577d1e84aadf4072b2046637
X-Git-Newrev: 6701d1f6664ddd69aa658b9ad646365654614411
Message-Id: <E1Ng3l1-0001I9-Ae@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 12 Feb 2010 22:13:03 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-71-g6701d1f
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Feb 2010 22:13:06 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6701d1f6664ddd69aa658b9ad646365654614411 (commit)
       via  2f057ab63ec78a61f53f090899c1e7b739ce4ce7 (commit)
      from  9287fdf621aff6e4577d1e84aadf4072b2046637 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6701d1f6664ddd69aa658b9ad646365654614411
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 23:14:16 2010 +0100

    Test if binary files are handled correctly.

diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 3a60ad0..cc91636 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -63,25 +63,31 @@ const u_long File::FILE_CREATE_ALWAYS = (1<<7);
 const u_long File::NO_INHERIT = (1<<8);
 
 
+/*!
+ *Costructor of the class.
+ */
 File::File ()
 {
   handle = (FileHandle) -1;
 }
 
+/*!
+ *D'tor.
+ */
 File::~File ()
 {
   close ();
 }
 
 /*!
- * Write data to a file.
- * buffer is the pointer to the data to write
- * buffersize is the number of byte to write
- * nbw is a pointer to an unsigned long that receive the number of the
- * bytes written correctly.
- * \param buffer The buffer where write.
- * \param buffersize The length of the buffer in bytes.
- * \param nbw How many bytes were written to the file.
+ *Write data to a file.
+ *buffer is the pointer to the data to write
+ *buffersize is the number of byte to write
+ *nbw is a pointer to an unsigned long that receive the number of the
+ *bytes written correctly.
+ *\param buffer The buffer where write.
+ *\param buffersize The length of the buffer in bytes.
+ *\param nbw How many bytes were written to the file.
  */
 int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
 {
@@ -101,9 +107,9 @@ int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
 }
 
 /*!
- * Constructor for the class.
- * \param nfilename Filename to open.
- * \param opt Specify how open the file.
+ *Constructor for the class.
+ *\param nfilename Filename to open.
+ *\param opt Specify how open the file.
  */
 File::File (char *nfilename, int opt)
   : handle ((FileHandle) -1)
@@ -113,7 +119,7 @@ File::File (char *nfilename, int opt)
 
 /*!
  * Truncate the file.
- * \param size Specify the new file size.
+ *\param size Specify the new file size.
  */
 int File::truncate (u_long size)
 {
@@ -125,11 +131,11 @@ int File::truncate (u_long size)
 }
 
 /*!
- * Open (or create if not exists) a file, but must explicitly use read and/or
- * write flags and open flag.
- * \param nfilename Filename to open.
- * \param opt Specify how open the file.
- * It returns 0 if the call was successful, any other value on errors.
+ *Open (or create if not exists) a file, but must explicitly use read and/or
+ *write flags and open flag.
+ *\param nfilename Filename to open.
+ *\param opt Specify how open the file.
+ *openFile returns 0 if the call was successful, any other value on errors.
  */
 int File::openFile (const char* nfilename,u_long opt)
 {
@@ -148,33 +154,28 @@ int File::openFile (const char* nfilename,u_long opt)
   /* FIXME: how avoid a stat?  */
   bool exists = stat (filename.c_str (), &fStats) == 0;
 
-  if ((opt & File::OPEN_IF_EXISTS) && !exists)
+  if (opt & File::OPEN_IF_EXISTS && !exists)
     return 1;
 
   if (exists && (opt & File::APPEND))
     flags |= O_APPEND;
 
-#if O_BINARY
-  flags |= O_BINARY;
-#endif
-
   if (exists)
-    handle = open (filename.c_str (), flags);
+    handle = open (filename.c_str (), O_APPEND | flags);
   else
     handle = open (filename.c_str (), O_CREAT | flags, S_IRUSR | S_IWUSR);
 
   if (opt & File::FILE_CREATE_ALWAYS)
     truncate ();
 
-  /* It will be removed on close.  */
   if (opt & File::TEMPORARY)
-    unlink (filename.c_str ());
+    unlink (filename.c_str ()); /* It will be removed on close.  */
 
   return handle < 0;
 }
 
 /*!
- * Returns the file handle.
+ *Returns the file handle.
  */
 Handle File::getHandle ()
 {
@@ -182,9 +183,9 @@ Handle File::getHandle ()
 }
 
 /*!
- * Set the base/file/file.handle.
- * Return a non null-value on errors.
- * \param hl The new base/file/file.handle.
+ *Set the base/file/file.handle.
+ *Return a non null-value on errors.
+ *\param hl The new base/file/file.handle.
  */
 int File::setHandle (Handle hl)
 {
@@ -193,8 +194,8 @@ int File::setHandle (Handle hl)
 }
 
 /*!
- * Define the operator =.
- * \param f The file to copy.
+ *define the operator =.
+ *\param f The file to copy.
  */
 int File::operator =(File f)
 {
@@ -204,9 +205,9 @@ int File::operator =(File f)
 }
 
 /*!
- * Set the name of the file
- * Return Non-zero on errors.
- * \param nfilename The new file name.
+ *Set the name of the file
+ *Return Non-zero on errors.
+ *\param nfilename The new file name.
  */
 int File::setFilename (const char* nfilename)
 {
@@ -215,7 +216,7 @@ int File::setFilename (const char* nfilename)
 }
 
 /*!
- * Returns the file path.
+ *Returns the file path.
  */
 const char *File::getFilename ()
 {
@@ -223,8 +224,8 @@ const char *File::getFilename ()
 }
 
 /*!
- * Create a temporary file.
- * \param filename The new temporary file name.
+ *Create a temporary file.
+ *\param filename The new temporary file name.
  */
 int File::createTemporaryFile (const char* filename)
 {
@@ -232,10 +233,10 @@ int File::createTemporaryFile (const char* filename)
     FilesUtility::deleteFile (filename);
 
   return openFile (filename, File::READ
-                   | File::WRITE
-                   | File::FILE_CREATE_ALWAYS
-                   | File::TEMPORARY
-                   | File::NO_INHERIT);
+                  | File::WRITE
+                  | File::FILE_CREATE_ALWAYS
+                  | File::TEMPORARY
+                  | File::NO_INHERIT);
 }
 
 /*!
@@ -270,8 +271,8 @@ u_long File::getFileSize ()
 }
 
 /*!
- * Change the position of the pointer to the file.
- * \param initialByte The new file pointer position.
+ *Change the position of the pointer to the file.
+ *\param initialByte The new file pointer position.
  */
 int File::seek (u_long initialByte)
 {
@@ -283,7 +284,7 @@ int File::seek (u_long initialByte)
 /*!
  * Get the current file pointer position.
  *
- * \return The current file pointer position.
+ *\return The current file pointer position.
  */
 u_long File::getSeek ()
 {
@@ -291,7 +292,7 @@ u_long File::getSeek ()
 }
 
 /*!
- * Get the time of the last modifify did to the file.
+ *Get the time of the last modifify did to the file.
  */
 time_t File::getLastModTime ()
 {
@@ -299,7 +300,7 @@ time_t File::getLastModTime ()
 }
 
 /*!
- * This function returns the creation time of the file.
+ *This function returns the creation time of the file.
  */
 time_t File::getCreationTime ()
 {
@@ -307,7 +308,7 @@ time_t File::getCreationTime ()
 }
 
 /*!
- * Returns the time of the last access to the file.
+ *Returns the time of the last access to the file.
  */
 time_t File::getLastAccTime ()
 {
@@ -315,7 +316,7 @@ time_t File::getLastAccTime ()
 }
 
 /*!
- * Inherited from Stream.
+ *Inherited from Stream.
  */
 int File::write (const char* buffer, u_long len, u_long *nbw)
 {
@@ -323,16 +324,16 @@ int File::write (const char* buffer, u_long len, u_long *nbw)
 }
 
 /*!
- * Read data from a file to a buffer.
- * Return a negative value on errors.
- * Return 0 on success.
- * \param buffer The buffer where write.
- * \param buffersize The length of the buffer in bytes.
- * \param nbr How many bytes were read to the buffer.
+ *Read data from a file to a buffer.
+ *Return a negative value on errors.
+ *Return 0 on success.
+ *\param buffer The buffer where write.
+ *\param buffersize The length of the buffer in bytes.
+ *\param nbr How many bytes were read to the buffer.
  */
 int File::read (char* buffer, u_long buffersize, u_long* nbr)
 {
-  int ret = ::read (handle, buffer, buffersize);
+  int ret  = ::read (handle, buffer, buffersize);
   if (ret < 0)
     return ret;
 
diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 76ae60c..a45dd06 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -41,6 +41,7 @@ class TestFile : public CppUnit::TestFixture
 
   CPPUNIT_TEST (testCreateTemporaryFile);
   CPPUNIT_TEST (testOnFile);
+  CPPUNIT_TEST (testBinary);
   CPPUNIT_TEST (testTruncate);
   CPPUNIT_TEST (testCreationTime);
   CPPUNIT_TEST (testLastAccessTime);
@@ -128,6 +129,22 @@ public:
     CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), 1ul);
   }
 
+  void testBinary ()
+  {
+    const char *data = "this\0text\0is\0NUL\0separed\0\0";
+    char buffer[32];
+    u_long nbw, nbr;
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->write (data, 26, &nbw), 0);
+    CPPUNIT_ASSERT_EQUAL (nbw, 26ul);
+
+    CPPUNIT_ASSERT_EQUAL (tfile->seek (0), 0);
+
+    CPPUNIT_ASSERT_EQUAL (tfile->read (buffer, 26, &nbr), 0);
+    CPPUNIT_ASSERT_EQUAL (nbr, 26ul);
+    CPPUNIT_ASSERT_EQUAL (memcmp (data, buffer, 26), 0);
+  }
+
   void testTruncate ()
   {
     u_long nbw;



commit 2f057ab63ec78a61f53f090899c1e7b739ce4ce7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 12 23:05:46 2010 +0100

    If O_BINARY is defined, use it when a file is opened.

diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index cc91636..3a60ad0 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -63,31 +63,25 @@ const u_long File::FILE_CREATE_ALWAYS = (1<<7);
 const u_long File::NO_INHERIT = (1<<8);
 
 
-/*!
- *Costructor of the class.
- */
 File::File ()
 {
   handle = (FileHandle) -1;
 }
 
-/*!
- *D'tor.
- */
 File::~File ()
 {
   close ();
 }
 
 /*!
- *Write data to a file.
- *buffer is the pointer to the data to write
- *buffersize is the number of byte to write
- *nbw is a pointer to an unsigned long that receive the number of the
- *bytes written correctly.
- *\param buffer The buffer where write.
- *\param buffersize The length of the buffer in bytes.
- *\param nbw How many bytes were written to the file.
+ * Write data to a file.
+ * buffer is the pointer to the data to write
+ * buffersize is the number of byte to write
+ * nbw is a pointer to an unsigned long that receive the number of the
+ * bytes written correctly.
+ * \param buffer The buffer where write.
+ * \param buffersize The length of the buffer in bytes.
+ * \param nbw How many bytes were written to the file.
  */
 int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
 {
@@ -107,9 +101,9 @@ int File::writeToFile (const char* buffer, u_long buffersize, u_long* nbw)
 }
 
 /*!
- *Constructor for the class.
- *\param nfilename Filename to open.
- *\param opt Specify how open the file.
+ * Constructor for the class.
+ * \param nfilename Filename to open.
+ * \param opt Specify how open the file.
  */
 File::File (char *nfilename, int opt)
   : handle ((FileHandle) -1)
@@ -119,7 +113,7 @@ File::File (char *nfilename, int opt)
 
 /*!
  * Truncate the file.
- *\param size Specify the new file size.
+ * \param size Specify the new file size.
  */
 int File::truncate (u_long size)
 {
@@ -131,11 +125,11 @@ int File::truncate (u_long size)
 }
 
 /*!
- *Open (or create if not exists) a file, but must explicitly use read and/or
- *write flags and open flag.
- *\param nfilename Filename to open.
- *\param opt Specify how open the file.
- *openFile returns 0 if the call was successful, any other value on errors.
+ * Open (or create if not exists) a file, but must explicitly use read and/or
+ * write flags and open flag.
+ * \param nfilename Filename to open.
+ * \param opt Specify how open the file.
+ * It returns 0 if the call was successful, any other value on errors.
  */
 int File::openFile (const char* nfilename,u_long opt)
 {
@@ -154,28 +148,33 @@ int File::openFile (const char* nfilename,u_long opt)
   /* FIXME: how avoid a stat?  */
   bool exists = stat (filename.c_str (), &fStats) == 0;
 
-  if (opt & File::OPEN_IF_EXISTS && !exists)
+  if ((opt & File::OPEN_IF_EXISTS) && !exists)
     return 1;
 
   if (exists && (opt & File::APPEND))
     flags |= O_APPEND;
 
+#if O_BINARY
+  flags |= O_BINARY;
+#endif
+
   if (exists)
-    handle = open (filename.c_str (), O_APPEND | flags);
+    handle = open (filename.c_str (), flags);
   else
     handle = open (filename.c_str (), O_CREAT | flags, S_IRUSR | S_IWUSR);
 
   if (opt & File::FILE_CREATE_ALWAYS)
     truncate ();
 
+  /* It will be removed on close.  */
   if (opt & File::TEMPORARY)
-    unlink (filename.c_str ()); /* It will be removed on close.  */
+    unlink (filename.c_str ());
 
   return handle < 0;
 }
 
 /*!
- *Returns the file handle.
+ * Returns the file handle.
  */
 Handle File::getHandle ()
 {
@@ -183,9 +182,9 @@ Handle File::getHandle ()
 }
 
 /*!
- *Set the base/file/file.handle.
- *Return a non null-value on errors.
- *\param hl The new base/file/file.handle.
+ * Set the base/file/file.handle.
+ * Return a non null-value on errors.
+ * \param hl The new base/file/file.handle.
  */
 int File::setHandle (Handle hl)
 {
@@ -194,8 +193,8 @@ int File::setHandle (Handle hl)
 }
 
 /*!
- *define the operator =.
- *\param f The file to copy.
+ * Define the operator =.
+ * \param f The file to copy.
  */
 int File::operator =(File f)
 {
@@ -205,9 +204,9 @@ int File::operator =(File f)
 }
 
 /*!
- *Set the name of the file
- *Return Non-zero on errors.
- *\param nfilename The new file name.
+ * Set the name of the file
+ * Return Non-zero on errors.
+ * \param nfilename The new file name.
  */
 int File::setFilename (const char* nfilename)
 {
@@ -216,7 +215,7 @@ int File::setFilename (const char* nfilename)
 }
 
 /*!
- *Returns the file path.
+ * Returns the file path.
  */
 const char *File::getFilename ()
 {
@@ -224,8 +223,8 @@ const char *File::getFilename ()
 }
 
 /*!
- *Create a temporary file.
- *\param filename The new temporary file name.
+ * Create a temporary file.
+ * \param filename The new temporary file name.
  */
 int File::createTemporaryFile (const char* filename)
 {
@@ -233,10 +232,10 @@ int File::createTemporaryFile (const char* filename)
     FilesUtility::deleteFile (filename);
 
   return openFile (filename, File::READ
-                  | File::WRITE
-                  | File::FILE_CREATE_ALWAYS
-                  | File::TEMPORARY
-                  | File::NO_INHERIT);
+                   | File::WRITE
+                   | File::FILE_CREATE_ALWAYS
+                   | File::TEMPORARY
+                   | File::NO_INHERIT);
 }
 
 /*!
@@ -271,8 +270,8 @@ u_long File::getFileSize ()
 }
 
 /*!
- *Change the position of the pointer to the file.
- *\param initialByte The new file pointer position.
+ * Change the position of the pointer to the file.
+ * \param initialByte The new file pointer position.
  */
 int File::seek (u_long initialByte)
 {
@@ -284,7 +283,7 @@ int File::seek (u_long initialByte)
 /*!
  * Get the current file pointer position.
  *
- *\return The current file pointer position.
+ * \return The current file pointer position.
  */
 u_long File::getSeek ()
 {
@@ -292,7 +291,7 @@ u_long File::getSeek ()
 }
 
 /*!
- *Get the time of the last modifify did to the file.
+ * Get the time of the last modifify did to the file.
  */
 time_t File::getLastModTime ()
 {
@@ -300,7 +299,7 @@ time_t File::getLastModTime ()
 }
 
 /*!
- *This function returns the creation time of the file.
+ * This function returns the creation time of the file.
  */
 time_t File::getCreationTime ()
 {
@@ -308,7 +307,7 @@ time_t File::getCreationTime ()
 }
 
 /*!
- *Returns the time of the last access to the file.
+ * Returns the time of the last access to the file.
  */
 time_t File::getLastAccTime ()
 {
@@ -316,7 +315,7 @@ time_t File::getLastAccTime ()
 }
 
 /*!
- *Inherited from Stream.
+ * Inherited from Stream.
  */
 int File::write (const char* buffer, u_long len, u_long *nbw)
 {
@@ -324,16 +323,16 @@ int File::write (const char* buffer, u_long len, u_long *nbw)
 }
 
 /*!
- *Read data from a file to a buffer.
- *Return a negative value on errors.
- *Return 0 on success.
- *\param buffer The buffer where write.
- *\param buffersize The length of the buffer in bytes.
- *\param nbr How many bytes were read to the buffer.
+ * Read data from a file to a buffer.
+ * Return a negative value on errors.
+ * Return 0 on success.
+ * \param buffer The buffer where write.
+ * \param buffersize The length of the buffer in bytes.
+ * \param nbr How many bytes were read to the buffer.
  */
 int File::read (char* buffer, u_long buffersize, u_long* nbr)
 {
-  int ret  = ::read (handle, buffer, buffersize);
+  int ret = ::read (handle, buffer, buffersize);
   if (ret < 0)
     return ret;
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/tests/test_file.cpp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 12 20:25:19 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ng6l5-0007Sb-Jq
	for mharc-myserver-commit@gnu.org; Fri, 12 Feb 2010 20:25:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ng6l3-0007SU-I6
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 20:25:17 -0500
Received: from [140.186.70.92] (port=51393 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ng6l0-0007SM-Se
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 20:25:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng6kz-0005Xq-FB
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 20:25:14 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:56708
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng6kz-0005XY-AR
	for myserver-commit@gnu.org; Fri, 12 Feb 2010 20:25:13 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ng6ky-0002jV-VO
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 01:25:13 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Ng6ky-00009E-Dn
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 01:25:12 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6701d1f6664ddd69aa658b9ad646365654614411
X-Git-Newrev: 68eefce5b1d394f80326cb5e4dcd28e937fe9ad0
Message-Id: <E1Ng6ky-00009E-Dn@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 13 Feb 2010 01:25:12 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-72-g68eefce
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 13 Feb 2010 01:25:17 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  68eefce5b1d394f80326cb5e4dcd28e937fe9ad0 (commit)
      from  6701d1f6664ddd69aa658b9ad646365654614411 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 68eefce5b1d394f80326cb5e4dcd28e937fe9ad0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 13 02:24:10 2010 +0100

    Define gnulib headers location in AM_CXXFLAGS instead of CXXFLAGS.

diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index e29729d..58c5510 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -1,4 +1,5 @@
 # Makefile for math_sum
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmath_sum.a
 libmath_sum_a_SOURCES = math_sum.cpp
 
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index ee1f50b..3abeb5e 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -1,4 +1,5 @@
 # Makefile for post
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libpost.a
 libpost_a_SOURCES = post.cpp
 
diff --git a/myserver/configure.ac b/myserver/configure.ac
index eb4c55e..2373590 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -325,8 +325,7 @@ fi
 
 LDFLAGS="$LDFLAGS $LIBS $pic_flag"
 CFLAGS="$pic_flag $CFLAGS"
-# FIXME: Define in every Makefile.am
-CXXFLAGS="-I$(pwd)/lib $pic_flag $CXXFLAGS"
+CXXFLAGS="$pic_flag $CXXFLAGS"
 
 AC_SUBST(CFLAGS)
 AC_SUBST(CXXFLAGS)
diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
index b8761d1..663a419 100644
--- a/myserver/src/GUI/Makefile.am
+++ b/myserver/src/GUI/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 install:
 if BUILD_GUI
 	cp ../../COPYING MyServer/GUI/
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index 3287ef7..808e836 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -1,4 +1,4 @@
-# Makefile for MyServer (./src)
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 SUBDIRS = base conf connection connections_scheduler filter http_handler \
 	log plugin protocol server GUI
 AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/base/Makefile.am b/myserver/src/base/Makefile.am
index d9b9d78..aa185b4 100644
--- a/myserver/src/base/Makefile.am
+++ b/myserver/src/base/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libbase.a
 libbase_a_SOURCES = utility.cpp
 SUBDIRS = base64 bitvec crypt dynamic_lib file files_cache read_directory \
diff --git a/myserver/src/base/base64/Makefile.am b/myserver/src/base/base64/Makefile.am
index 27f66c7..21f0c1b 100644
--- a/myserver/src/base/base64/Makefile.am
+++ b/myserver/src/base/base64/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libbase64.a
 libbase64_a_SOURCES = mime_utils.cpp
 SUBDIRS =
diff --git a/myserver/src/base/bitvec/Makefile.am b/myserver/src/base/bitvec/Makefile.am
index 09724ff..f7c1ba1 100644
--- a/myserver/src/base/bitvec/Makefile.am
+++ b/myserver/src/base/bitvec/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libbitvec.a
 libbitvec_a_SOURCES = bitvec.cpp
 SUBDIRS =
diff --git a/myserver/src/base/crypt/Makefile.am b/myserver/src/base/crypt/Makefile.am
index 012ca6c..a8e0740 100644
--- a/myserver/src/base/crypt/Makefile.am
+++ b/myserver/src/base/crypt/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libcrypt.a
 libcrypt_a_SOURCES = crypt_algo.cpp crypt_algo_manager.cpp md5.cpp sha1.cpp
 SUBDIRS =
diff --git a/myserver/src/base/dynamic_lib/Makefile.am b/myserver/src/base/dynamic_lib/Makefile.am
index 3820ed3..aa17621 100644
--- a/myserver/src/base/dynamic_lib/Makefile.am
+++ b/myserver/src/base/dynamic_lib/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libdynamic_lib.a
 libdynamic_lib_a_SOURCES = dynamiclib.cpp
 SUBDIRS =
diff --git a/myserver/src/base/file/Makefile.am b/myserver/src/base/file/Makefile.am
index 5128274..d521e7c 100644
--- a/myserver/src/base/file/Makefile.am
+++ b/myserver/src/base/file/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfile.a
 libfile_a_SOURCES = file.cpp files_utility.cpp
 SUBDIRS =
diff --git a/myserver/src/base/files_cache/Makefile.am b/myserver/src/base/files_cache/Makefile.am
index 10e9526..bee9f99 100644
--- a/myserver/src/base/files_cache/Makefile.am
+++ b/myserver/src/base/files_cache/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfiles_cache.a
 libfiles_cache_a_SOURCES = cached_file_buffer.cpp cached_file.cpp \
 			   cached_file_factory.cpp membuf_file.cpp
diff --git a/myserver/src/base/hash_map/Makefile.am b/myserver/src/base/hash_map/Makefile.am
index 57daef1..76aaa13 100644
--- a/myserver/src/base/hash_map/Makefile.am
+++ b/myserver/src/base/hash_map/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhash_map.a
 libhash_map_a_SOURCES = hash_map.cpp
 SUBDIRS =
diff --git a/myserver/src/base/home_dir/Makefile.am b/myserver/src/base/home_dir/Makefile.am
index 5a5f4be..f4d1e67 100644
--- a/myserver/src/base/home_dir/Makefile.am
+++ b/myserver/src/base/home_dir/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhome_dir.a
 libhome_dir_a_SOURCES = home_dir.cpp
 SUBDIRS =
diff --git a/myserver/src/base/mem_buff/Makefile.am b/myserver/src/base/mem_buff/Makefile.am
index a33e97e..8abba4e 100644
--- a/myserver/src/base/mem_buff/Makefile.am
+++ b/myserver/src/base/mem_buff/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmem_buff.a
 libmem_buff_a_SOURCES = mem_buff.cpp
 SUBDIRS =
diff --git a/myserver/src/base/multicast/Makefile.am b/myserver/src/base/multicast/Makefile.am
index f6e3bd8..b6f8423 100644
--- a/myserver/src/base/multicast/Makefile.am
+++ b/myserver/src/base/multicast/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmulticast.a
 libmulticast_a_SOURCES = multicast.cpp
 SUBDIRS =
diff --git a/myserver/src/base/pipe/Makefile.am b/myserver/src/base/pipe/Makefile.am
index 74a5394..4ce749a 100644
--- a/myserver/src/base/pipe/Makefile.am
+++ b/myserver/src/base/pipe/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libpipe.a
 libpipe_a_SOURCES = pipe.cpp
 SUBDIRS =
diff --git a/myserver/src/base/process/Makefile.am b/myserver/src/base/process/Makefile.am
index 72f1ad2..2688602 100644
--- a/myserver/src/base/process/Makefile.am
+++ b/myserver/src/base/process/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libprocess.a
 libprocess_a_SOURCES = fork_server.cpp process.cpp process_server_manager.cpp
 SUBDIRS =
diff --git a/myserver/src/base/read_directory/Makefile.am b/myserver/src/base/read_directory/Makefile.am
index f5b15d5..4028f52 100644
--- a/myserver/src/base/read_directory/Makefile.am
+++ b/myserver/src/base/read_directory/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libread_directory.a
 libread_directory_a_SOURCES = read_directory.cpp
 SUBDIRS =
diff --git a/myserver/src/base/regex/Makefile.am b/myserver/src/base/regex/Makefile.am
index 2c5a53b..c7302e0 100644
--- a/myserver/src/base/regex/Makefile.am
+++ b/myserver/src/base/regex/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libregex.a
 libregex_a_SOURCES = myserver_regex.cpp
 SUBDIRS =
diff --git a/myserver/src/base/safetime/Makefile.am b/myserver/src/base/safetime/Makefile.am
index 023c390..9b5fe78 100644
--- a/myserver/src/base/safetime/Makefile.am
+++ b/myserver/src/base/safetime/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsafetime.a
 libsafetime_a_SOURCES = safetime.cpp
 SUBDIRS =
diff --git a/myserver/src/base/slab/Makefile.am b/myserver/src/base/slab/Makefile.am
index d6129fa..363cac2 100644
--- a/myserver/src/base/slab/Makefile.am
+++ b/myserver/src/base/slab/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libslab.a
 libslab_a_SOURCES = slab.cpp
 SUBDIRS =
diff --git a/myserver/src/base/socket/Makefile.am b/myserver/src/base/socket/Makefile.am
index cddd4d7..7d8a25b 100644
--- a/myserver/src/base/socket/Makefile.am
+++ b/myserver/src/base/socket/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsocket.a
 libsocket_a_SOURCES = socket.cpp ssl_socket.cpp
 SUBDIRS =
diff --git a/myserver/src/base/socket_pair/Makefile.am b/myserver/src/base/socket_pair/Makefile.am
index 30c3ec8..6a94351 100644
--- a/myserver/src/base/socket_pair/Makefile.am
+++ b/myserver/src/base/socket_pair/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsocket_pair.a
 libsocket_pair_a_SOURCES = socket_pair.cpp
 SUBDIRS =
diff --git a/myserver/src/base/ssl/Makefile.am b/myserver/src/base/ssl/Makefile.am
index da79543..f8d5e80 100644
--- a/myserver/src/base/ssl/Makefile.am
+++ b/myserver/src/base/ssl/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libssl.a
 libssl_a_SOURCES = ssl.cpp
 SUBDIRS =
diff --git a/myserver/src/base/string/Makefile.am b/myserver/src/base/string/Makefile.am
index 665bb06..430f267 100644
--- a/myserver/src/base/string/Makefile.am
+++ b/myserver/src/base/string/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libstring.a
 libstring_a_SOURCES = securestr.cpp stringutils.cpp
 SUBDIRS =
diff --git a/myserver/src/base/sync/Makefile.am b/myserver/src/base/sync/Makefile.am
index d3bc558..bca19b0 100644
--- a/myserver/src/base/sync/Makefile.am
+++ b/myserver/src/base/sync/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsync.a
 libsync_a_SOURCES = event.cpp mutex.cpp read_write_lock.cpp recursive_mutex.cpp semaphore.cpp
 SUBDIRS =
diff --git a/myserver/src/base/thread/Makefile.am b/myserver/src/base/thread/Makefile.am
index 44a7710..ee6fc19 100644
--- a/myserver/src/base/thread/Makefile.am
+++ b/myserver/src/base/thread/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libthread.a
 libthread_a_SOURCES = thread.cpp
 SUBDIRS =
diff --git a/myserver/src/base/unix_socket/Makefile.am b/myserver/src/base/unix_socket/Makefile.am
index 7aaed0d..2c6eef8 100644
--- a/myserver/src/base/unix_socket/Makefile.am
+++ b/myserver/src/base/unix_socket/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libunix_socket.a
 libunix_socket_a_SOURCES = unix_socket.cpp
 SUBDIRS =
diff --git a/myserver/src/base/xml/Makefile.am b/myserver/src/base/xml/Makefile.am
index 05aea1d..0fae474 100644
--- a/myserver/src/base/xml/Makefile.am
+++ b/myserver/src/base/xml/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libxml.a
 libxml_a_SOURCES = xml_parser.cpp
 SUBDIRS =
diff --git a/myserver/src/conf/Makefile.am b/myserver/src/conf/Makefile.am
index 8cd6693..303ac44 100644
--- a/myserver/src/conf/Makefile.am
+++ b/myserver/src/conf/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libconf.a
 libconf_a_SOURCES = nodetree.cpp xml_conf.cpp
 SUBDIRS = main mime security vhost
diff --git a/myserver/src/conf/main/Makefile.am b/myserver/src/conf/main/Makefile.am
index 440c502..c0c5fd1 100644
--- a/myserver/src/conf/main/Makefile.am
+++ b/myserver/src/conf/main/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmain.a
 libmain_a_SOURCES = main_configuration.cpp xml_main_configuration.cpp
 SUBDIRS =
diff --git a/myserver/src/conf/mime/Makefile.am b/myserver/src/conf/mime/Makefile.am
index 66dddf2..498b179 100644
--- a/myserver/src/conf/mime/Makefile.am
+++ b/myserver/src/conf/mime/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmime.a
 libmime_a_SOURCES = mime_manager.cpp xml_mime_handler.cpp
 SUBDIRS =
diff --git a/myserver/src/conf/security/Makefile.am b/myserver/src/conf/security/Makefile.am
index ade38ec..ebe0bb8 100644
--- a/myserver/src/conf/security/Makefile.am
+++ b/myserver/src/conf/security/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsecurity.a
 libsecurity_a_SOURCES = auth_domain.cpp auth_method.cpp auth_method_factory.cpp security_cache.cpp security_domain.cpp security_manager.cpp security_token.cpp validator.cpp validator_factory.cpp xml_validator.cpp
 SUBDIRS =
diff --git a/myserver/src/conf/vhost/Makefile.am b/myserver/src/conf/vhost/Makefile.am
index e7af0be..3074458 100644
--- a/myserver/src/conf/vhost/Makefile.am
+++ b/myserver/src/conf/vhost/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libvhost.a
 libvhost_a_SOURCES = vhost.cpp vhost_manager.cpp ip.cpp xml_vhost_handler.cpp
 SUBDIRS =
diff --git a/myserver/src/connection/Makefile.am b/myserver/src/connection/Makefile.am
index 41c9695..25b1127 100644
--- a/myserver/src/connection/Makefile.am
+++ b/myserver/src/connection/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libconnection.a
 libconnection_a_SOURCES = connection.cpp
 SUBDIRS =
diff --git a/myserver/src/connections_scheduler/Makefile.am b/myserver/src/connections_scheduler/Makefile.am
index ebcdf2e..f6c7473 100644
--- a/myserver/src/connections_scheduler/Makefile.am
+++ b/myserver/src/connections_scheduler/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libconnections_scheduler.a
 libconnections_scheduler_a_SOURCES = connections_scheduler.cpp listen_threads.cpp
 SUBDIRS =
diff --git a/myserver/src/filter/Makefile.am b/myserver/src/filter/Makefile.am
index fdc8b39..53084ff 100644
--- a/myserver/src/filter/Makefile.am
+++ b/myserver/src/filter/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfilter.a
 libfilter_a_SOURCES = filter.cpp filters_chain.cpp filters_factory.cpp memory_stream.cpp stream.cpp \
 			console.cpp
diff --git a/myserver/src/filter/gzip/Makefile.am b/myserver/src/filter/gzip/Makefile.am
index 8a6f8a7..895a22f 100644
--- a/myserver/src/filter/gzip/Makefile.am
+++ b/myserver/src/filter/gzip/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libgzip.a
 libgzip_a_SOURCES = gzip.cpp gzip_decompress.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/Makefile.am b/myserver/src/http_handler/Makefile.am
index 768d3ae..cf8edb3 100644
--- a/myserver/src/http_handler/Makefile.am
+++ b/myserver/src/http_handler/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp_handler.a
 libhttp_handler_a_SOURCES =
 SUBDIRS = cgi fastcgi http_dir http_file isapi mscgi proxy scgi wincgi
diff --git a/myserver/src/http_handler/cgi/Makefile.am b/myserver/src/http_handler/cgi/Makefile.am
index 29f3ce9..2019ca1 100644
--- a/myserver/src/http_handler/cgi/Makefile.am
+++ b/myserver/src/http_handler/cgi/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libcgi.a
 libcgi_a_SOURCES = cgi.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/fastcgi/Makefile.am b/myserver/src/http_handler/fastcgi/Makefile.am
index 9050525..0bf003e 100644
--- a/myserver/src/http_handler/fastcgi/Makefile.am
+++ b/myserver/src/http_handler/fastcgi/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfastcgi.a
 libfastcgi_a_SOURCES = fastcgi.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/http_dir/Makefile.am b/myserver/src/http_handler/http_dir/Makefile.am
index 1847a1a..086f3cf 100644
--- a/myserver/src/http_handler/http_dir/Makefile.am
+++ b/myserver/src/http_handler/http_dir/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp_dir.a
 libhttp_dir_a_SOURCES = http_dir.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/http_file/Makefile.am b/myserver/src/http_handler/http_file/Makefile.am
index faa8264..5cb96b8 100644
--- a/myserver/src/http_handler/http_file/Makefile.am
+++ b/myserver/src/http_handler/http_file/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp_file.a
 libhttp_file_a_SOURCES = http_file.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/isapi/Makefile.am b/myserver/src/http_handler/isapi/Makefile.am
index 44e5b1c..f53f45a 100644
--- a/myserver/src/http_handler/isapi/Makefile.am
+++ b/myserver/src/http_handler/isapi/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libisapi.a
 libisapi_a_SOURCES = isapi.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/mscgi/Makefile.am b/myserver/src/http_handler/mscgi/Makefile.am
index 30ba86f..e46cc0d 100644
--- a/myserver/src/http_handler/mscgi/Makefile.am
+++ b/myserver/src/http_handler/mscgi/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmscgi.a
 libmscgi_a_SOURCES = mscgi.cpp mscgi_manager.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/proxy/Makefile.am b/myserver/src/http_handler/proxy/Makefile.am
index c36f808..ce7d53a 100644
--- a/myserver/src/http_handler/proxy/Makefile.am
+++ b/myserver/src/http_handler/proxy/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libproxy.a
 libproxy_a_SOURCES = proxy.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/scgi/Makefile.am b/myserver/src/http_handler/scgi/Makefile.am
index 667faf5..a181789 100644
--- a/myserver/src/http_handler/scgi/Makefile.am
+++ b/myserver/src/http_handler/scgi/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libscgi.a
 libscgi_a_SOURCES = scgi.cpp
 SUBDIRS =
diff --git a/myserver/src/http_handler/wincgi/Makefile.am b/myserver/src/http_handler/wincgi/Makefile.am
index ae01189..29c1cf0 100644
--- a/myserver/src/http_handler/wincgi/Makefile.am
+++ b/myserver/src/http_handler/wincgi/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libwincgi.a
 libwincgi_a_SOURCES = wincgi.cpp
 SUBDIRS =
diff --git a/myserver/src/log/Makefile.am b/myserver/src/log/Makefile.am
index 62c95d1..c3a2a97 100644
--- a/myserver/src/log/Makefile.am
+++ b/myserver/src/log/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = liblog.a
 liblog_a_SOURCES = log_manager.cpp
 SUBDIRS = stream
diff --git a/myserver/src/log/stream/Makefile.am b/myserver/src/log/stream/Makefile.am
index 9e73658..bb04fc0 100644
--- a/myserver/src/log/stream/Makefile.am
+++ b/myserver/src/log/stream/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libstream.a
 libstream_a_SOURCES = console_stream.cpp file_stream.cpp \
 		log_stream.cpp log_stream_factory.cpp \
diff --git a/myserver/src/plugin/Makefile.am b/myserver/src/plugin/Makefile.am
index 7638bc5..aaa6194 100644
--- a/myserver/src/plugin/Makefile.am
+++ b/myserver/src/plugin/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libplugin.a
 libplugin_a_SOURCES =  plugin.cpp plugin_info.cpp plugins_manager.cpp 
 AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/protocol/Makefile.am b/myserver/src/protocol/Makefile.am
index 0f26c60..fa72e56 100644
--- a/myserver/src/protocol/Makefile.am
+++ b/myserver/src/protocol/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libprotocol.a
 libprotocol_a_SOURCES = protocol_buffer.cpp protocol.cpp protocols_manager.cpp \
 			url.cpp
diff --git a/myserver/src/protocol/control/Makefile.am b/myserver/src/protocol/control/Makefile.am
index aae9807..bd46a92 100644
--- a/myserver/src/protocol/control/Makefile.am
+++ b/myserver/src/protocol/control/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libcontrol.a
 libcontrol_a_SOURCES = control_header.cpp control_protocol.cpp
 SUBDIRS =
diff --git a/myserver/src/protocol/ftp/Makefile.am b/myserver/src/protocol/ftp/Makefile.am
index 691f824..da742fa 100644
--- a/myserver/src/protocol/ftp/Makefile.am
+++ b/myserver/src/protocol/ftp/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libftp.a
 libftp_a_SOURCES = ftp.cpp ftp_lexer.cpp ftp_parser.cpp
 EXTRA_DIST = ftp_lexer.out.cpp  ftp_parser.ypp  ftp_lexer.lpp
diff --git a/myserver/src/protocol/gopher/Makefile.am b/myserver/src/protocol/gopher/Makefile.am
index a952fe3..c3005a3 100644
--- a/myserver/src/protocol/gopher/Makefile.am
+++ b/myserver/src/protocol/gopher/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libgopher.a
 libgopher_a_SOURCES = gopher.cpp gopher_content.cpp engine.cpp
 AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/protocol/http/Makefile.am b/myserver/src/protocol/http/Makefile.am
index 98b480d..f03cb3b 100644
--- a/myserver/src/protocol/http/Makefile.am
+++ b/myserver/src/protocol/http/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp.a
 libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp http_errors.cpp http_headers.cpp http_request.cpp http_req_security_domain.cpp http_response.cpp http_thread_context.cpp dyn_http_manager.cpp dyn_http_manager_list.cpp dyn_http_command.cpp dyn_http_command_manager.cpp
 SUBDIRS = env
diff --git a/myserver/src/protocol/http/env/Makefile.am b/myserver/src/protocol/http/env/Makefile.am
index c8a1d92..09b052a 100644
--- a/myserver/src/protocol/http/env/Makefile.am
+++ b/myserver/src/protocol/http/env/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libenv.a
 libenv_a_SOURCES = env.cpp
 SUBDIRS =
diff --git a/myserver/src/protocol/https/Makefile.am b/myserver/src/protocol/https/Makefile.am
index 9e05691..424f5c1 100644
--- a/myserver/src/protocol/https/Makefile.am
+++ b/myserver/src/protocol/https/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttps.a
 libhttps_a_SOURCES = https.cpp
 SUBDIRS =
diff --git a/myserver/src/server/Makefile.am b/myserver/src/server/Makefile.am
index d74c9c6..190c6e6 100644
--- a/myserver/src/server/Makefile.am
+++ b/myserver/src/server/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libserver.a
 libserver_a_SOURCES = clients_thread.cpp server.cpp
 SUBDIRS =

-----------------------------------------------------------------------

Summary of changes:
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |    1 +
 myserver/binaries/web/cgi-src/post/Makefile.am     |    1 +
 myserver/configure.ac                              |    3 +--
 myserver/src/GUI/Makefile.am                       |    1 +
 myserver/src/Makefile.am                           |    2 +-
 myserver/src/base/Makefile.am                      |    1 +
 myserver/src/base/base64/Makefile.am               |    1 +
 myserver/src/base/bitvec/Makefile.am               |    1 +
 myserver/src/base/crypt/Makefile.am                |    1 +
 myserver/src/base/dynamic_lib/Makefile.am          |    1 +
 myserver/src/base/file/Makefile.am                 |    1 +
 myserver/src/base/files_cache/Makefile.am          |    1 +
 myserver/src/base/hash_map/Makefile.am             |    1 +
 myserver/src/base/home_dir/Makefile.am             |    1 +
 myserver/src/base/mem_buff/Makefile.am             |    1 +
 myserver/src/base/multicast/Makefile.am            |    1 +
 myserver/src/base/pipe/Makefile.am                 |    1 +
 myserver/src/base/process/Makefile.am              |    1 +
 myserver/src/base/read_directory/Makefile.am       |    1 +
 myserver/src/base/regex/Makefile.am                |    1 +
 myserver/src/base/safetime/Makefile.am             |    1 +
 myserver/src/base/slab/Makefile.am                 |    1 +
 myserver/src/base/socket/Makefile.am               |    1 +
 myserver/src/base/socket_pair/Makefile.am          |    1 +
 myserver/src/base/ssl/Makefile.am                  |    1 +
 myserver/src/base/string/Makefile.am               |    1 +
 myserver/src/base/sync/Makefile.am                 |    1 +
 myserver/src/base/thread/Makefile.am               |    1 +
 myserver/src/base/unix_socket/Makefile.am          |    1 +
 myserver/src/base/xml/Makefile.am                  |    1 +
 myserver/src/conf/Makefile.am                      |    1 +
 myserver/src/conf/main/Makefile.am                 |    1 +
 myserver/src/conf/mime/Makefile.am                 |    1 +
 myserver/src/conf/security/Makefile.am             |    1 +
 myserver/src/conf/vhost/Makefile.am                |    1 +
 myserver/src/connection/Makefile.am                |    1 +
 myserver/src/connections_scheduler/Makefile.am     |    1 +
 myserver/src/filter/Makefile.am                    |    1 +
 myserver/src/filter/gzip/Makefile.am               |    1 +
 myserver/src/http_handler/Makefile.am              |    1 +
 myserver/src/http_handler/cgi/Makefile.am          |    1 +
 myserver/src/http_handler/fastcgi/Makefile.am      |    1 +
 myserver/src/http_handler/http_dir/Makefile.am     |    1 +
 myserver/src/http_handler/http_file/Makefile.am    |    1 +
 myserver/src/http_handler/isapi/Makefile.am        |    1 +
 myserver/src/http_handler/mscgi/Makefile.am        |    1 +
 myserver/src/http_handler/proxy/Makefile.am        |    1 +
 myserver/src/http_handler/scgi/Makefile.am         |    1 +
 myserver/src/http_handler/wincgi/Makefile.am       |    1 +
 myserver/src/log/Makefile.am                       |    1 +
 myserver/src/log/stream/Makefile.am                |    1 +
 myserver/src/plugin/Makefile.am                    |    1 +
 myserver/src/protocol/Makefile.am                  |    1 +
 myserver/src/protocol/control/Makefile.am          |    1 +
 myserver/src/protocol/ftp/Makefile.am              |    1 +
 myserver/src/protocol/gopher/Makefile.am           |    1 +
 myserver/src/protocol/http/Makefile.am             |    1 +
 myserver/src/protocol/http/env/Makefile.am         |    1 +
 myserver/src/protocol/https/Makefile.am            |    1 +
 myserver/src/server/Makefile.am                    |    1 +
 60 files changed, 60 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Feb 13 18:11:41 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NgR9I-0000h8-Sx
	for mharc-myserver-commit@gnu.org; Sat, 13 Feb 2010 18:11:40 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NgR9H-0000gr-7O
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 18:11:39 -0500
Received: from [140.186.70.92] (port=48837 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NgR9F-0000gf-Gs
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 18:11:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NgR9F-0000yx-4y
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 18:11:37 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:37741
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NgR9F-0000yt-3L
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 18:11:37 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NgR9E-0001Qa-UM
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 23:11:36 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NgR9D-0000DZ-V6
	for myserver-commit@gnu.org; Sat, 13 Feb 2010 23:11:36 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 68eefce5b1d394f80326cb5e4dcd28e937fe9ad0
X-Git-Newrev: 722818f7a168c8624e1c87fdc30eaaa857ae89f3
Message-Id: <E1NgR9D-0000DZ-V6@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 13 Feb 2010 23:11:36 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-74-g722818f
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 13 Feb 2010 23:11:39 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  722818f7a168c8624e1c87fdc30eaaa857ae89f3 (commit)
       via  b808d39b11c502a68160707d5964ae3d4203221e (commit)
      from  68eefce5b1d394f80326cb5e4dcd28e937fe9ad0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 722818f7a168c8624e1c87fdc30eaaa857ae89f3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 14 00:11:43 2010 +0100

    Replace "Transfer-Encoding" with "Transfer-encoding"

diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 6661f90..9724871 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -277,13 +277,13 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
               if (keepalive)
                 {
                   HttpResponseHeader::Entry *e;
-                  e = ConnInfo->td->response.other.get ("Transfer-Encoding");
+                  e = ConnInfo->td->response.other.get ("Transfer-encoding");
                   if (e)
                     e->value->assign ("chunked");
                   else
                     {
                       e = new HttpResponseHeader::Entry ();
-                      e->name->assign ("Transfer-Encoding");
+                      e->name->assign ("Transfer-encoding");
                       e->value->assign ("chunked");
                       ConnInfo->td->response.other.put (*(e->name), e);
                     }
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 0ef7f6a..97ba057 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -179,7 +179,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
 
   string transferEncoding;
   bool hasTransferEncoding = false;
-  tmp = td->response.getValue ("Transfer-Encoding", NULL);
+  tmp = td->response.getValue ("Transfer-encoding", NULL);
   if (tmp)
     {
       hasTransferEncoding = false;
@@ -187,7 +187,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
     }
 
   if (useChunks)
-    td->response.setValue ("Transfer-Encoding", "chunked");
+    td->response.setValue ("Transfer-encoding", "chunked");
 
 
   u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
@@ -231,7 +231,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
   \param useChunks Use chunked transfer encoding
   with the client.
   \param keepalive The connection is keep-alive.
-  \param serverTransferEncoding Transfer-Encoding
+  \param serverTransferEncoding Transfer-encoding
   used by the server.
 
   \return -1 on error.
diff --git a/myserver/src/protocol/http/http_data_handler.cpp b/myserver/src/protocol/http/http_data_handler.cpp
index 0363f13..4742532 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -204,13 +204,13 @@ HttpDataHandler::checkDataChunks (HttpThreadContext* td, bool* keepalive,
   if (*keepalive)
     {
       HttpResponseHeader::Entry *e;
-      e = td->response.other.get ("Transfer-Encoding");
+      e = td->response.other.get ("Transfer-encoding");
       if (e)
         e->value->assign ("chunked");
       else
         {
           e = new HttpResponseHeader::Entry ();
-          e->name->assign ("Transfer-Encoding");
+          e->name->assign ("Transfer-encoding");
           e->value->assign ("chunked");
           td->response.other.put (*(e->name), e);
         }
diff --git a/myserver/src/protocol/http/http_data_read.cpp b/myserver/src/protocol/http/http_data_read.cpp
index bb71f47..4fcde2f 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -246,7 +246,7 @@ int HttpDataRead::readPostData (HttpThreadContext* td, int* httpRetCode)
     td->request.other.get ("Content-type");
 
   HttpRequestHeader::Entry *encoding =
-    td->request.other.get ("Transfer-Encoding");
+    td->request.other.get ("Transfer-encoding");
 
   /* Specify a type if it not specified by the client.  */
   if (contentType == 0)
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 3ef0d38..9887741 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -73,9 +73,9 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
     {
       /*
        * Do not specify the Content-length field if it is used
-       * the chunked Transfer-Encoding.
+       * the chunked Transfer-encoding.
        */
-      HttpResponseHeader::Entry *e = response->other.get ("Transfer-Encoding");
+      HttpResponseHeader::Entry *e = response->other.get ("Transfer-encoding");
 
       if (!e || (e && e->value->find ("chunked", 0) == string::npos ))
         {



commit b808d39b11c502a68160707d5964ae3d4203221e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 14 00:11:18 2010 +0100

    Include gnulib directory in includes

diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 31ac38e..d5bbf75 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -1,3 +1,4 @@
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 bin_PROGRAMS = test_suite
 test_suite_SOURCES =  	main.cpp				\
 			memory_socket.h			\

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/http_handler/isapi/isapi.cpp        |    4 ++--
 myserver/src/http_handler/proxy/proxy.cpp        |    6 +++---
 myserver/src/protocol/http/http_data_handler.cpp |    4 ++--
 myserver/src/protocol/http/http_data_read.cpp    |    2 +-
 myserver/src/protocol/http/http_headers.cpp      |    4 ++--
 myserver/tests/Makefile.am                       |    1 +
 6 files changed, 11 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Feb 14 15:37:22 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NglDW-00049T-Jx
	for mharc-myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:22 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NglDT-00048T-Ue
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:19 -0500
Received: from [140.186.70.92] (port=57347 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NglDT-00048L-6p
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NglDS-0006lr-HS
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:19 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:56872
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NglDS-0006ln-EI
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:18 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NglDS-0008JY-9K
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 20:37:18 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NglDS-0000ZY-47
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 20:37:18 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 722818f7a168c8624e1c87fdc30eaaa857ae89f3
X-Git-Newrev: ec4ba561117523370b425485cddead9a48799c0c
Message-Id: <E1NglDS-0000ZY-47@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 14 Feb 2010 20:37:18 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_1-76-gec4ba56
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Feb 2010 20:37:20 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  ec4ba561117523370b425485cddead9a48799c0c (commit)
       via  6d84876ba2f6a545f0722771b3d6d9a13a07ab62 (commit)
      from  722818f7a168c8624e1c87fdc30eaaa857ae89f3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit ec4ba561117523370b425485cddead9a48799c0c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 14 21:05:10 2010 +0100

    Bump version number.

diff --git a/myserver/version b/myserver/version
index f514a2f..f76f913 100644
--- a/myserver/version
+++ b/myserver/version
@@ -1 +1 @@
-0.9.1
\ No newline at end of file
+0.9.2
\ No newline at end of file



commit 6d84876ba2f6a545f0722771b3d6d9a13a07ab62
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 14 21:04:32 2010 +0100

    Rename `dataOnRead' to `dataAvailable'

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index b571a40..c65752a 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -98,7 +98,7 @@ public:
   int getsockname (MYSERVER_SOCKADDR*,int*);
   int setNonBlocking (int);
   bool getNonBlocking () {return isNonBlocking;}
-  virtual int dataOnRead (int sec = 0, int usec = 500);
+  virtual int dataAvailable (int sec = 0, int usec = 500);
 
   u_long getThrottling ();
   void setThrottling (u_long);
diff --git a/myserver/include/base/socket/ssl_socket.h b/myserver/include/base/socket/ssl_socket.h
index 72bf6b7..cb8a415 100644
--- a/myserver/include/base/socket/ssl_socket.h
+++ b/myserver/include/base/socket/ssl_socket.h
@@ -54,9 +54,9 @@ public:
   virtual u_long bytesToRead ();
 
 # ifdef __HURD__
-  virtual int dataOnRead (int sec = 1, int usec = 500);
+  virtual int dataAvailable (int sec = 1, int usec = 500);
 # else
-  virtual int dataOnRead (int sec = 0, int usec = 500);
+  virtual int dataAvailable (int sec = 0, int usec = 500);
 # endif
 
   SslSocket ();
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index a64207c..70dadc6 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -531,7 +531,7 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
  */
 int Socket::recv (char* buffer, int len, int flags, u_long timeout)
 {
-  int ret = dataOnRead (timeout / 1000, timeout % 1000);
+  int ret = dataAvailable (timeout / 1000, timeout % 1000);
 
   if (ret < 0)
     return ret;
@@ -650,7 +650,7 @@ Socket* Socket::getServerSocket ()
  *Check if there is data ready to be read.
  *Returns 1 if there is data to read, 0 if not.
  */
-int Socket::dataOnRead (int sec, int usec)
+int Socket::dataAvailable (int sec, int usec)
 {
   struct timeval tv;
   fd_set readfds;
diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index 3c4aba0..4c9231a 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -306,11 +306,11 @@ u_long SslSocket::bytesToRead ()
 /*!
  *Check if there is data ready to be read.
  */
-int SslSocket::dataOnRead (int sec, int usec)
+int SslSocket::dataAvailable (int sec, int usec)
 {
   if (bytesToRead ())
     return 1;
 
-  return Socket::dataOnRead (sec, usec);
+  return Socket::dataAvailable (sec, usec);
 }
 
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 4fb2589..bc31a78 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -537,7 +537,7 @@ void Ftp::pasv ()
   MYSERVER_SOCKADDRIN asockIn;
   socklen_t asockInLen = 0;
   Socket *asock;
-  if (pFtpuserData->m_pDataConnection->socket->dataOnRead (timeoutvalue, 0)
+  if (pFtpuserData->m_pDataConnection->socket->dataAvailable (timeoutvalue, 0)
       == 1)
     {
       asockInLen = sizeof (sockaddr_in);
diff --git a/myserver/tests/memory_socket.h b/myserver/tests/memory_socket.h
index 54bd531..32a818f 100644
--- a/myserver/tests/memory_socket.h
+++ b/myserver/tests/memory_socket.h
@@ -36,7 +36,7 @@ public:
   virtual int recv (char*, int, int) {return 0;}
   virtual u_long bytesToRead () {return 0;}
 
-  virtual int dataOnRead (int sec = 0, int usec = 500){return 0;}
+  virtual int dataAvailable (int sec = 0, int usec = 500){return 0;}
 
   int read (char* buffer, u_long len, u_long *nbr)
   {
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index c71ad70..34b15c7 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -121,7 +121,7 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (Thread::create (&tid, testRecvClient, &arg), 0);
 
-    CPPUNIT_ASSERT (obj->dataOnRead (5));
+    CPPUNIT_ASSERT (obj->dataAvailable (5));
 
     Socket s = obj->accept (&sockIn, &sockInLen);
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/socket/socket.h     |    2 +-
 myserver/include/base/socket/ssl_socket.h |    4 ++--
 myserver/src/base/socket/socket.cpp       |    4 ++--
 myserver/src/base/socket/ssl_socket.cpp   |    4 ++--
 myserver/src/protocol/ftp/ftp.cpp         |    2 +-
 myserver/tests/memory_socket.h            |    2 +-
 myserver/tests/test_socket.cpp            |    2 +-
 myserver/version                          |    2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Feb 14 15:37:23 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NglDX-0004A6-PR
	for mharc-myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:23 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NglDW-00049c-Fe
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:22 -0500
Received: from [140.186.70.92] (port=57350 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NglDV-000496-Kv
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NglDV-0006mP-8E
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:21 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:56873
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NglDV-0006mL-5f
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 15:37:21 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NglDV-0008Jc-17
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 20:37:21 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NglDU-0000aN-T1
	for myserver-commit@gnu.org; Sun, 14 Feb 2010 20:37:21 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/tags/0_9_2
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: 6ac1c80d8a8940a0afe5a4c598687b1df9036eeb
Message-Id: <E1NglDU-0000aN-T1@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 14 Feb 2010 20:37:20 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer annotated tag, 0_9_2,
	created. 0_9_2
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Feb 2010 20:37:22 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The annotated tag, 0_9_2 has been created
        at  6ac1c80d8a8940a0afe5a4c598687b1df9036eeb (tag)
   tagging  ec4ba561117523370b425485cddead9a48799c0c (commit)
  replaces  0_9_1
 tagged by  Giuseppe Scrivano
        on  Sun Feb 14 21:35:42 2010 +0100

- Log -----------------------------------------------------------------
version 0.9.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAkt4XqUACgkQB5GvjMAzY/TbKQCgyHL60YkOnmM7otkmI6U+Dbz0
TeIAoNrW8FcpLbvTZKjv3GFh2lEHk890
=LsVv
-----END PGP SIGNATURE-----

Giuseppe Scrivano (76):
      Fix a compiling issue under Windows.
      Under Windows configuration files can be only in the current directory.
      Http header parser avoids to copy more bytes than needed.
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Do not define GCRY_CONTROL when the gcrypt library is present.
      Use the `gethostname' gnulib module.
      Skip the test if /bin/echo does not exist.
      Load static libraries before do any test.
      Load SSL static data earlier.
      Use a timeout value when the socket is read
      Kill the fork server on exceptions.
      Call killServer in the ForkServer destructor.
      Mass update: Include 2010 in copyright years.
      Use <stdint.h> types, not define them again
      Assume argp is present
      Remove unused file.
      Rename stdafx.h to myserver.h
      Rename tests_suite to test_suite
      Use the `mktime' and `unlink' gnulib modules.
      Tests are not executed by the main Makefile
      Update the tests suite program name
      Leave an empty space between the cast type and the object to convert.
      Remove static variable FastCgi::timeout.
      Update years in the copyright
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Remove EVENT_LIB variable definition
      Use new gnulib modules for Win32 sockets functions.
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Include config.h in any case
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Use AC_LIBTOOL_WIN32_DLL
      Change type of the `host' variable to string.
      Pipe::inverted duplicates used handles.
      The two branches are identical, remove one.
      Use new/free instead of calloc.
      Ensure to create the server class instance
      Specify a WINVER recent enough to support getaddrinfo.
      Add a delay after the writer thread creation
      Move inclusion of myserver headers before undef open/close
      Show tests progress when executed in text mode
      Use gnulib ioctl module
      Remove WIN32 legacy code in favor of gnulib abstractions
      Remove legacy code for files handling.  Use new gnulib modules.
      Remove legacy code for files handling. Use new gnulib modules.
      Rename `socketHandle' to `fd'.
      Invoke autoreconf in place of aclocal/autoheader/automake/autoconf
      Remove unused files.
      Rename file
      Fix a name conflict.
      Avoid a double cast when checking the error status
      Use LT_INIT to initialize libtool and autoupdate
      CFLAGS doesn't force gnulib directory inclusion, CXXFLAGS still does.
      Remove definition of SSL_LIB
      Fix compiler warnings
      Remove INVALID_SOCKET definition
      Remove SOCKET_ERROR definition
      Fix more compiler warnings
      Use SHUT_RDWR in place of SD_BOTH
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Specify the gettext library to the linker.
      Use gnulib select
      Use the mutex class when pthread is not available.
      Avoid exceptions in threads but report them to the caller.
      Include <sys/select.h>
      Use the socket handler as key for the connections map, not the fd.
      Use the socket handle when calling gnutls functions.
      Adjust includes
      FD_TO_SOCKET/SOCKET_TO_FD are defined only on WIN32
      If O_BINARY is defined, use it when a file is opened.
      Test if binary files are handled correctly.
      Define gnulib headers location in AM_CXXFLAGS instead of CXXFLAGS.
      Include gnulib directory in includes
      Replace "Transfer-Encoding" with "Transfer-encoding"
      Rename `dataOnRead' to `dataAvailable'
      Bump version number.

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 16 07:11:51 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NhMHO-0003O4-L1
	for mharc-myserver-commit@gnu.org; Tue, 16 Feb 2010 07:11:50 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NhMHM-0003Nz-46
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 07:11:48 -0500
Received: from [140.186.70.92] (port=48919 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NhMHK-0003Nq-Dy
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 07:11:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhMHJ-0008T0-Sh
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 07:11:46 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:43103
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhMHJ-0008Sw-Ps
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 07:11:45 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhMHJ-0004ET-PJ
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 12:11:45 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NhMHJ-00084v-Bi
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 12:11:45 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ec4ba561117523370b425485cddead9a48799c0c
X-Git-Newrev: 55f8bc1720d6423c53a6d2434441372ca0768d0c
Message-Id: <E1NhMHJ-00084v-Bi@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 16 Feb 2010 12:11:45 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-2-g55f8bc1
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Feb 2010 12:11:49 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  55f8bc1720d6423c53a6d2434441372ca0768d0c (commit)
       via  f73d12eff0e4dcababb077e8a72b468944b2d155 (commit)
      from  ec4ba561117523370b425485cddead9a48799c0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 55f8bc1720d6423c53a6d2434441372ca0768d0c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 16 12:22:02 2010 +0100

    TestHomeDir::testGetAdmin passes if the user is not found.
    
    Reported by: Ludovic Courtès <ludo@gnu.org>

diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index fa3f36b..612752e 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -17,11 +17,14 @@
 
 #include "myserver.h"
 #include <include/base/home_dir/home_dir.h>
+#include <include/base/file/files_utility.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#include <errno.h>
+
 class TestHomeDir : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestHomeDir );
@@ -60,7 +63,24 @@ public:
 #endif
     string dir;
 
-    CPPUNIT_ASSERT_EQUAL (homeDir->getHomeDir (username, dir), 0);
+#if !WIN32
+    errno = 0;
+#endif
+
+    int ret = homeDir->getHomeDir (username, dir);
+
+    /* FIXME: handle this case in homeDir::getHomeDir.  */
+#if GETPWNAM
+    /* If the user could not be found, silently return.  */
+    if (ret && (errno == ENOENT || errno == ESRCH || errno == EBADF
+                || errno == EPERM))
+      return;
+#elif !WIN32
+    if (! FilesUtility::fileExists ("/etc/passwd"))
+      return;
+#endif
+
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
 
     CPPUNIT_ASSERT (dir.length ());
 



commit f73d12eff0e4dcababb077e8a72b468944b2d155
Author: Ludovic Courtès <ludo@gnu.org>
Date:   Tue Feb 16 12:02:28 2010 +0100

    Avoid a DNS lookup.  Now TestSocket::testRecv works in a chroot.

diff --git a/myserver/THANKS b/myserver/THANKS
index 0f74f08..3d11452 100644
--- a/myserver/THANKS
+++ b/myserver/THANKS
@@ -5,4 +5,5 @@ or if you'd prefer a different address be used, please send a note to
 the bug mailing list.
 
 Renato Nunes Bastos                 <rnbastos@yahoo.com>
+Ludovic Courtès                     <ludo@gnu.org>
 Debarshi Ray                        <rishi@gnu.org>
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index 34b15c7..326917c 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -178,7 +178,7 @@ static DEFINE_THREAD (testRecvClient, pParam)
     {
       int ret;
       Socket *obj2 = new Socket;
-      char host[] = "localhost";
+      char host[] = "127.0.0.1";
 
       ret = obj2->socket (AF_INET, SOCK_STREAM, 0);
       CPPUNIT_ASSERT (ret != -1);

-----------------------------------------------------------------------

Summary of changes:
 myserver/THANKS                 |    1 +
 myserver/tests/test_homedir.cpp |   22 +++++++++++++++++++++-
 myserver/tests/test_socket.cpp  |    2 +-
 3 files changed, 23 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 16 11:56:52 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NhQjE-00022l-OT
	for mharc-myserver-commit@gnu.org; Tue, 16 Feb 2010 11:56:52 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NhQjD-00022H-AX
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 11:56:51 -0500
Received: from [140.186.70.92] (port=42772 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NhQjB-00021L-L9
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 11:56:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhQjB-0006ex-82
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 11:56:49 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:51548
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhQjB-0006es-4J
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 11:56:49 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhQjA-0007ds-SX
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 16:56:48 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NhQj9-0004o2-J1
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 16:56:48 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 55f8bc1720d6423c53a6d2434441372ca0768d0c
X-Git-Newrev: 350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a
Message-Id: <E1NhQj9-0004o2-J1@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 16 Feb 2010 16:56:47 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-4-g350cd5a
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Feb 2010 16:56:51 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a (commit)
       via  a20502f7085be5deb06892670e0a4a2fa2c907b4 (commit)
      from  55f8bc1720d6423c53a6d2434441372ca0768d0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 16 17:56:23 2010 +0100

    If the user is not found, TestHomeDir::testGetAdmin exits immediately.

diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 2e5c4fd..467d333 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -76,7 +76,7 @@ public:
                 || errno == EPERM))
       return;
 #elif !WIN32
-    if (! FilesUtility::fileExists ("/etc/passwd"))
+    if (! FilesUtility::fileExists ("/etc/passwd") || dir.length ())
       return;
 #endif
 



commit a20502f7085be5deb06892670e0a4a2fa2c907b4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 16 17:46:31 2010 +0100

    The configure script sets HAVE_GETPWNAM not GETPWNAM, use it accordingly.

diff --git a/myserver/include/base/home_dir/home_dir.h b/myserver/include/base/home_dir/home_dir.h
index df0bf24..194a4cc 100644
--- a/myserver/include/base/home_dir/home_dir.h
+++ b/myserver/include/base/home_dir/home_dir.h
@@ -47,7 +47,7 @@ private:
 
 # ifdef WIN32
   string data;
-# elif !GETPWNAM
+# elif !HAVE_GETPWNAM
   HashMap<string, string*> data;
 # endif
   time_t timestamp;
diff --git a/myserver/src/base/home_dir/home_dir.cpp b/myserver/src/base/home_dir/home_dir.cpp
index 8f0c61e..1870572 100644
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -34,7 +34,7 @@ extern "C"
 #include <stdarg.h>
 #include <stdio.h>
 
-#ifdef GETPWNAM
+#ifdef HAVE_GETPWNAM
 # include <pwd.h>
 #endif
 
@@ -64,7 +64,7 @@ HomeDir::HomeDir ()
 {
 #ifdef WIN32
   data.assign ("");
-#elif !GETPWNAM
+#elif !HAVE_GETPWNAM
   data.clear ();
 #endif
   timestamp = 0;
@@ -89,7 +89,7 @@ void HomeDir::clear ()
 {
 #ifdef WIN32
   data.assign ("");
-#elif !GETPWNAM
+#elif !HAVE_GETPWNAM
   HashMap<string, string*>::Iterator i = data.begin ();
   for (; i != data.end (); i++)
     {
@@ -138,7 +138,7 @@ int HomeDir::loadImpl ()
         }
     }
   data.assign (buf);
-#elif !GETPWNAM
+#elif !HAVE_GETPWNAM
   File usersFile;
   u_long size;
   char* buffer;
@@ -235,7 +235,7 @@ int HomeDir::getHomeDir (string& userName, string& out)
   out.assign (data);
   out.append ("/");
   out.append (userName);
-#elif GETPWNAM
+#elif HAVE_GETPWNAM
   struct passwd *p;
   int ret = 0;
 
diff --git a/myserver/src/base/process/process.cpp b/myserver/src/base/process/process.cpp
index a6932f8..a167f6c 100644
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -33,7 +33,7 @@ extern "C"
 # include <sys/types.h>
 # include <sys/wait.h>
 
-# ifdef GETPWNAM
+# ifdef HAVE_GETPWNAM
 #  include <pwd.h>
 # endif
 
@@ -335,7 +335,7 @@ uid_t Process::getUid (const char *user)
         return uid;
     }
 
-# ifdef GETPWNAM
+# ifdef HAVE_GETPWNAM
   struct passwd *u = getpwnam (user);
   if (u != NULL)
     return u->pw_uid;
diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 612752e..2e5c4fd 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -70,7 +70,7 @@ public:
     int ret = homeDir->getHomeDir (username, dir);
 
     /* FIXME: handle this case in homeDir::getHomeDir.  */
-#if GETPWNAM
+#if HAVE_GETPWNAM
     /* If the user could not be found, silently return.  */
     if (ret && (errno == ENOENT || errno == ESRCH || errno == EBADF
                 || errno == EPERM))

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/home_dir/home_dir.h |    2 +-
 myserver/src/base/home_dir/home_dir.cpp   |   10 +++++-----
 myserver/src/base/process/process.cpp     |    4 ++--
 myserver/tests/test_homedir.cpp           |    4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 16 12:05:19 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NhQrP-0007ME-85
	for mharc-myserver-commit@gnu.org; Tue, 16 Feb 2010 12:05:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NhQrN-0007Kp-G8
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 12:05:17 -0500
Received: from [140.186.70.92] (port=52586 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NhQrM-0007Is-DV
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 12:05:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhQrK-0007aU-EM
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 12:05:14 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:41836
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhQrK-0007aQ-Ci
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 12:05:14 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NhQrK-0007kt-BE
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 17:05:14 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NhQrK-0005Zn-7M
	for myserver-commit@gnu.org; Tue, 16 Feb 2010 17:05:14 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a
X-Git-Newrev: 257530993ef3c84242e56ce0edf76302b31f15ff
Message-Id: <E1NhQrK-0005Zn-7M@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 16 Feb 2010 17:05:14 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-5-g2575309
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Feb 2010 17:05:17 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  257530993ef3c84242e56ce0edf76302b31f15ff (commit)
      from  350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 257530993ef3c84242e56ce0edf76302b31f15ff
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 16 18:03:25 2010 +0100

    If the user is not found `dir.length ()' is zero.
    
    Problem introduced by the last commit 350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a.

diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 467d333..3e0b959 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -76,7 +76,7 @@ public:
                 || errno == EPERM))
       return;
 #elif !WIN32
-    if (! FilesUtility::fileExists ("/etc/passwd") || dir.length ())
+    if (! FilesUtility::fileExists ("/etc/passwd") || !dir.length ())
       return;
 #endif
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/tests/test_homedir.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Feb 18 05:43:46 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ni3rG-00084U-Ck
	for mharc-myserver-commit@gnu.org; Thu, 18 Feb 2010 05:43:46 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ni3rE-00083u-7l
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 05:43:44 -0500
Received: from [140.186.70.92] (port=58362 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ni3rB-00083J-VB
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 05:43:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni3rB-0007PN-Jz
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 05:43:42 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:46516
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni3rB-0007PJ-Ft
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 05:43:41 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni3rB-0005Mp-4d
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 10:43:41 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Ni3rB-0007Wb-0I
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 10:43:41 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 257530993ef3c84242e56ce0edf76302b31f15ff
X-Git-Newrev: af784c22995cd1d92e25ff53b21c68c8bb6ed14f
Message-Id: <E1Ni3rB-0007Wb-0I@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 18 Feb 2010 10:43:41 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-6-gaf784c2
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Feb 2010 10:43:44 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  af784c22995cd1d92e25ff53b21c68c8bb6ed14f (commit)
      from  257530993ef3c84242e56ce0edf76302b31f15ff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit af784c22995cd1d92e25ff53b21c68c8bb6ed14f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Feb 18 11:41:03 2010 +0100

    Refactor HomeDir::getHomeDir return codes.
    
    Now HomeDir::getHomeDir includes checks done previously by the
    TestHomeDir::testGetAdmin test.

diff --git a/myserver/src/base/home_dir/home_dir.cpp b/myserver/src/base/home_dir/home_dir.cpp
index 1870572..90b346c 100644
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -228,6 +228,8 @@ int HomeDir::loadImpl ()
  * \param userName The user name.
  * \param out The buffer where write.
  * \return 0 on success.
+ * \return < 0 on error.
+ * \return > 0 if the user home directory does not exist.
  */
 int HomeDir::getHomeDir (string& userName, string& out)
 {
@@ -235,6 +237,7 @@ int HomeDir::getHomeDir (string& userName, string& out)
   out.assign (data);
   out.append ("/");
   out.append (userName);
+  return FilesUtility::fileExists (out.c_str ()) ? 0 : 1;
 #elif HAVE_GETPWNAM
   struct passwd *p;
   int ret = 0;
@@ -249,13 +252,18 @@ int HomeDir::getHomeDir (string& userName, string& out)
 
   loadMutex.unlock ();
 
-  return ret;
+  /* The user was not found.  */
+  if (p == NULL && (errno == ENOENT || errno == ESRCH || errno == EBADF
+                    || errno == EPERM))
+    return 1;
+
+  return p ? 0 : -1;
 #else
   static u_long lastCheckTime = 0;
   string *res = 0;
 
   if (!loaded)
-    return 1;
+    return -1;
 
   if (getTicks () - lastCheckTime > MYSERVER_SEC (1))
     {
@@ -265,9 +273,13 @@ int HomeDir::getHomeDir (string& userName, string& out)
     }
   res = data.get (userName);
   if (res)
+    {
       out.assign (*res);
+      return 0;
+    }
   else
-    out.assign ("");
+    return 1;
 #endif
-  return 0;
+
+  return -1;
 }
diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 3e0b959..ce8f295 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -17,14 +17,11 @@
 
 #include "myserver.h"
 #include <include/base/home_dir/home_dir.h>
-#include <include/base/file/files_utility.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
-#include <errno.h>
-
 class TestHomeDir : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestHomeDir );
@@ -62,28 +59,14 @@ public:
     username.assign ("root");
 #endif
     string dir;
-
-#if !WIN32
-    errno = 0;
-#endif
-
     int ret = homeDir->getHomeDir (username, dir);
 
-    /* FIXME: handle this case in homeDir::getHomeDir.  */
-#if HAVE_GETPWNAM
     /* If the user could not be found, silently return.  */
-    if (ret && (errno == ENOENT || errno == ESRCH || errno == EBADF
-                || errno == EPERM))
+    if (ret > 0)
       return;
-#elif !WIN32
-    if (! FilesUtility::fileExists ("/etc/passwd") || !dir.length ())
-      return;
-#endif
 
     CPPUNIT_ASSERT_EQUAL (ret, 0);
-
     CPPUNIT_ASSERT (dir.length ());
-
     homeDir->clear ();
   }
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/base/home_dir/home_dir.cpp |   20 ++++++++++++++++----
 myserver/tests/test_homedir.cpp         |   19 +------------------
 2 files changed, 17 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Feb 18 06:54:14 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ni4xS-0000uo-Oh
	for mharc-myserver-commit@gnu.org; Thu, 18 Feb 2010 06:54:14 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ni4xR-0000uU-Ko
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 06:54:13 -0500
Received: from [140.186.70.92] (port=49000 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ni4xQ-0000uE-AT
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 06:54:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni4xO-0006fe-1Q
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 06:54:12 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:60165
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni4xN-0006fW-Vy
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 06:54:10 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni4xN-0006Bp-N5
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 11:54:09 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Ni4xN-0003Bx-HB
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 11:54:09 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: af784c22995cd1d92e25ff53b21c68c8bb6ed14f
X-Git-Newrev: f94f2ccdd45fc7d0ebb4f41f125f706df0d755f4
Message-Id: <E1Ni4xN-0003Bx-HB@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 18 Feb 2010 11:54:09 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-7-gf94f2cc
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Feb 2010 11:54:13 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  f94f2ccdd45fc7d0ebb4f41f125f706df0d755f4 (commit)
      from  af784c22995cd1d92e25ff53b21c68c8bb6ed14f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit f94f2ccdd45fc7d0ebb4f41f125f706df0d755f4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Feb 18 12:51:52 2010 +0100

    XmlMainConfiguration::getValue uses the DEFINE value, not the raw xml.
    
    Add a test in TestXmlMainConfiguration to exercise it.

diff --git a/myserver/include/conf/main/xml_main_configuration.h b/myserver/include/conf/main/xml_main_configuration.h
index eeb25e8..f9f763a 100644
--- a/myserver/include/conf/main/xml_main_configuration.h
+++ b/myserver/include/conf/main/xml_main_configuration.h
@@ -40,10 +40,7 @@ public:
     return open (filename.c_str ());
   };
 
-  virtual const char *getValue (const char* field)
-  {
-    return xmlParser.getValue (field);
-  }
+  virtual const char *getValue (const char* field);
 
   virtual const char *getValue (string const &field)
   {
diff --git a/myserver/src/conf/main/xml_main_configuration.cpp b/myserver/src/conf/main/xml_main_configuration.cpp
index 6eb38c6..04f3cb3 100644
--- a/myserver/src/conf/main/xml_main_configuration.cpp
+++ b/myserver/src/conf/main/xml_main_configuration.cpp
@@ -36,3 +36,35 @@ void XmlMainConfiguration::readData (list<NodeTree<string>*> *hashedDataTrees,
   xmlNodePtr root = xmlDocGetRootElement (xmlParser.getDoc ())->xmlChildrenNode;
   XmlConf::build (root, hashedDataTrees, hashedData);
 }
+
+/*!
+ * Return the last value defined as <DEFINE name="FIELD" value="VALUE" /> in the
+ * xml file.
+ */
+const char *XmlMainConfiguration::getValue (const char* field)
+{
+  const char *ret = NULL;
+  xmlNodePtr lcur = xmlDocGetRootElement (xmlParser.getDoc ())->xmlChildrenNode;
+  xmlAttr *attrs;
+  for (; lcur; lcur = lcur->next)
+    if (lcur->name && !xmlStrcmp (lcur->name, (const xmlChar *) "DEFINE"))
+      {
+        NodeTree<string> *node = new NodeTree<string> ();
+        const char *name = NULL;
+        const char *value = NULL;
+
+        for (attrs = lcur->properties; attrs; attrs = attrs->next)
+          {
+            if (!xmlStrcmp (attrs->name, (const xmlChar *) "name") &&
+                attrs->children && attrs->children->content)
+              name = (const char*)attrs->children->content;
+            else if (!xmlStrcmp (attrs->name, (const xmlChar *) "value") &&
+                attrs->children && attrs->children->content)
+              value = (const char*)attrs->children->content;
+          }
+        if (! strcmp (name, field))
+          ret = value;
+      }
+
+  return ret;
+}
diff --git a/myserver/tests/test_xml_main_configuration.cpp b/myserver/tests/test_xml_main_configuration.cpp
index bf0baf5..4a25c46 100644
--- a/myserver/tests/test_xml_main_configuration.cpp
+++ b/myserver/tests/test_xml_main_configuration.cpp
@@ -23,36 +23,80 @@
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#include <include/base/file/files_utility.h>
+
+#define KEY "foo.bar"
+#define VALUE "value"
+#define XML_FILE "foo.xml"
+#define XML_CONTENT "<?xml version=\"1.0\"?>\n<MYSERVER>"   \
+  "<DEFINE name=\"" KEY "\" value=\"garbage\" />"             \
+  "<DEFINE name=\"" KEY "\" value=\"" VALUE "\" />"             \
+  "</MYSERVER>\n"
+
 class TestXmlMainConfiguration : public CppUnit::TestFixture
 {
-  /* FIXME: Actually these tests don't really check if things work, simply they
-     check that they don't work when they shouldn't.  */
-	CPPUNIT_TEST_SUITE (TestXmlMainConfiguration);
-	CPPUNIT_TEST (testOpen);
-	CPPUNIT_TEST (testGetDoc);
-	CPPUNIT_TEST (testClose);
-	CPPUNIT_TEST_SUITE_END ();
+  CPPUNIT_TEST_SUITE (TestXmlMainConfiguration);
+  CPPUNIT_TEST (testOpen);
+  CPPUNIT_TEST (testGetDoc);
+  CPPUNIT_TEST (testGetValue);
+  CPPUNIT_TEST (testClose);
+  CPPUNIT_TEST_SUITE_END ();
 
+  File xmlFile;
+  XmlMainConfiguration xmlConf;
 public:
-	void setUp () {}
-	void tearDown () {}
-	void testOpen ()
-	{
-    XmlMainConfiguration xmlConf;
-		CPPUNIT_ASSERT (xmlConf.open ("bla/bla/bla"));
-	}
-
-	void testGetDoc ()
-	{
-    XmlMainConfiguration xmlConf;
-		CPPUNIT_ASSERT_EQUAL (xmlConf.getDoc (), (xmlDocPtr)NULL);
-	}
-
-	void testClose ()
-	{
-    XmlMainConfiguration xmlConf;
-		CPPUNIT_ASSERT (xmlConf.close ());
-	}
+  void setUp ()
+  {
+    u_long nbw;
+    xmlFile.openFile (XML_FILE, File::WRITE | File::READ
+                      | File::FILE_CREATE_ALWAYS);
+    CPPUNIT_ASSERT_EQUAL (xmlFile.write (XML_CONTENT, strlen (XML_CONTENT),
+                                           &nbw), 0);
+    CPPUNIT_ASSERT_EQUAL (nbw, static_cast<u_long> (strlen (XML_CONTENT)));
+
+    CPPUNIT_ASSERT_EQUAL (xmlConf.open (XML_FILE), 0);
+  }
+  void tearDown ()
+  {
+    CPPUNIT_ASSERT_EQUAL (xmlConf.close (), 0);
+    FilesUtility::deleteFile (XML_FILE);
+  }
+
+  void testOpen ()
+  {
+    XmlMainConfiguration tmpXmlConf;
+
+    /* These files don't exist.  */
+    CPPUNIT_ASSERT (tmpXmlConf.open ("foo/bar/baz.xml"));
+    CPPUNIT_ASSERT (tmpXmlConf.open ("baz.xml"));
+
+    CPPUNIT_ASSERT_EQUAL (tmpXmlConf.open (XML_FILE), 0);
+    CPPUNIT_ASSERT_EQUAL (tmpXmlConf.close (), 0);
+  }
+
+  void testGetDoc ()
+  {
+    XmlMainConfiguration tmpXmlConf;
+    CPPUNIT_ASSERT_EQUAL (tmpXmlConf.getDoc (), static_cast <xmlDocPtr> (NULL));
+    CPPUNIT_ASSERT (xmlConf.getDoc ());
+  }
+
+  void testGetValue ()
+  {
+    const char *ret = xmlConf.getValue (KEY);
+    CPPUNIT_ASSERT (ret);
+    CPPUNIT_ASSERT (! strcmp (ret, VALUE));
+    CPPUNIT_ASSERT_EQUAL (strcmp (ret, VALUE), 0);
+  }
+
+  void testClose ()
+  {
+    XmlMainConfiguration tmpXmlConf;
+
+    CPPUNIT_ASSERT (tmpXmlConf.close ());
+    CPPUNIT_ASSERT_EQUAL (tmpXmlConf.open (XML_FILE), 0);
+    CPPUNIT_ASSERT_EQUAL (tmpXmlConf.close (), 0);
+  }
 };
 
 CPPUNIT_TEST_SUITE_REGISTRATION (TestXmlMainConfiguration);

-----------------------------------------------------------------------

Summary of changes:
 .../include/conf/main/xml_main_configuration.h     |    5 +-
 myserver/src/conf/main/xml_main_configuration.cpp  |   32 +++++++
 myserver/tests/test_xml_main_configuration.cpp     |   96 ++++++++++++++------
 3 files changed, 103 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Feb 18 08:27:54 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ni6Q6-0003JF-HG
	for mharc-myserver-commit@gnu.org; Thu, 18 Feb 2010 08:27:54 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NhuSl-0004PS-Vd
	for myserver-commit@gnu.org; Wed, 17 Feb 2010 19:41:52 -0500
Received: from [140.186.70.92] (port=38451 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NhuSj-0004Ny-K7
	for myserver-commit@gnu.org; Wed, 17 Feb 2010 19:41:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1NhuSj-0004Y3-5u
	for myserver-commit@gnu.org; Wed, 17 Feb 2010 19:41:49 -0500
Received: from proliant.st.ewi.tudelft.nl ([130.161.158.3]:37943)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1NhuSi-0004Xv-V7
	for myserver-commit@gnu.org; Wed, 17 Feb 2010 19:41:49 -0500
Received: from hydra (buildfarm.st.ewi.tudelft.nl [130.161.158.181])
	by proliant.st.ewi.tudelft.nl (8.12.11/8.12.8) with SMTP id
	o1I0fl2l027990
	for <myserver-commit@gnu.org>; Thu, 18 Feb 2010 01:41:47 +0100
Message-Id: <201002180041.o1I0fl2l027990@proliant.st.ewi.tudelft.nl>
Received: by hydra (sSMTP sendmail emulation); Thu, 18 Feb 2010 01:41:47 +0100
To: myserver-commit@gnu.org
From: Hydra Build Daemon <e.dolstra@tudelft.nl>
Date: Thu, 18 Feb 2010 01:41:47 +0100
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Mailman-Approved-At: Thu, 18 Feb 2010 08:27:52 -0500
Subject: [myserver-commit] Hydra job gnu:myserver-master:tarball build
	296256 FAILED
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Feb 2010 00:41:52 -0000

Hi,

This is to let you know that Hydra build 296256 of job gnu:myserver-master:tarball has changed from SUCCEEDED to FAILED.

Complete build information can be found on this page: http://hydra.nixos.org/build/296256

The last 50 lines of the build log are shown at the bottom of this email.

A summary of the build information follows:

Build ID:              | 296256
Nix name:              | myserver-tarball-0pre257530993ef3c84242e56ce0edf76302b31f15ff
Short description:     | Build of a source distribution from a checkout
Maintainer(s):         | myserver-commit@gnu.org
System:                | x86_64-linux
Derivation store path: | /nix/store/b60p9qvfh7z45a6d866xki12wnmimk65-myserver-tarball-0pre257530993ef3c84242e56ce0edf76302b31f15ff.drv
Output store path:     | /nix/store/fl737nk3fyd69f8vp3spwm149zzn058q-myserver-tarball-0pre257530993ef3c84242e56ce0edf76302b31f15ff
Time added:            | 2010-02-18 01:41:47
Build started:         | 2010-02-18 01:41:06
Build finished:        | 2010-02-18 01:41:47
Duration:              | 41s

The build inputs were:

Name        | Type | Value
------------+------+---------------------------------------------------------------------------
myserverSrc | git  | git://git.sv.gnu.org/myserver.git:257530993ef3c84242e56ce0edf76302b31f15ff
hydraConfig | svn  | https://svn.nixos.org/repos/nix/hydra-config/gnu/trunk:20071
nixpkgs     | svn  | https://svn.nixos.org/repos/nix/nixpkgs/trunk:20083

Regards,

The Hydra build daemon.

---



From MAILER-DAEMON Thu Feb 18 08:27:54 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ni6Q6-0003JK-NV
	for mharc-myserver-commit@gnu.org; Thu, 18 Feb 2010 08:27:54 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ni5zh-0002Ah-5b
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 08:00:37 -0500
Received: from [140.186.70.92] (port=32929 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ni5zg-0002AB-2O
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 08:00:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1Ni5zf-0005gW-6o
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 08:00:35 -0500
Received: from proliant.st.ewi.tudelft.nl ([130.161.158.3]:38464)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1Ni5ze-0005gO-VD
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 08:00:35 -0500
Received: from hydra (buildfarm.st.ewi.tudelft.nl [130.161.158.181])
	by proliant.st.ewi.tudelft.nl (8.12.11/8.12.8) with SMTP id
	o1ID0Xbv007024
	for <myserver-commit@gnu.org>; Thu, 18 Feb 2010 14:00:33 +0100
Message-Id: <201002181300.o1ID0Xbv007024@proliant.st.ewi.tudelft.nl>
Received: by hydra (sSMTP sendmail emulation); Thu, 18 Feb 2010 14:00:33 +0100
To: myserver-commit@gnu.org
From: Hydra Build Daemon <e.dolstra@tudelft.nl>
Date: Thu, 18 Feb 2010 14:00:33 +0100
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Mailman-Approved-At: Thu, 18 Feb 2010 08:27:52 -0500
Subject: [myserver-commit] Hydra job gnu:myserver-master:tarball build
	297211 SUCCEEDED
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Feb 2010 13:00:37 -0000

Hi,

This is to let you know that Hydra build 297211 of job gnu:myserver-master:tarball has changed from FAILED to SUCCEEDED.

Complete build information can be found on this page: http://hydra.nixos.org/build/297211

A summary of the build information follows:

Build ID:              | 297211
Nix name:              | myserver-tarball-0pref94f2ccdd45fc7d0ebb4f41f125f706df0d755f4
Short description:     | Build of a source distribution from a checkout
Maintainer(s):         | myserver-commit@gnu.org
System:                | x86_64-linux
Derivation store path: | /nix/store/74wcgm6x5xz78ivsi1vq7jdmk7wdnzj6-myserver-tarball-0pref94f2ccdd45fc7d0ebb4f41f125f706df0d755f4.drv
Output store path:     | /nix/store/5drdsvzahx4xb66pycanhhyb4qml2a1c-myserver-tarball-0pref94f2ccdd45fc7d0ebb4f41f125f706df0d755f4
Time added:            | 2010-02-18 14:00:33
Build started:         | 2010-02-18 13:52:24
Build finished:        | 2010-02-18 14:00:33
Duration:              | 489s

The build inputs were:

Name        | Type | Value
------------+------+---------------------------------------------------------------------------
myserverSrc | git  | git://git.sv.gnu.org/myserver.git:f94f2ccdd45fc7d0ebb4f41f125f706df0d755f4
hydraConfig | svn  | https://svn.nixos.org/repos/nix/hydra-config/gnu/trunk:20071
nixpkgs     | svn  | https://svn.nixos.org/repos/nix/nixpkgs/trunk:20096

Regards,

The Hydra build daemon.



From MAILER-DAEMON Thu Feb 18 11:53:10 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ni9ck-0001VH-JB
	for mharc-myserver-commit@gnu.org; Thu, 18 Feb 2010 11:53:10 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ni9cj-0001VC-Kd
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 11:53:09 -0500
Received: from [140.186.70.92] (port=60159 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ni9ch-0001Uq-LR
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 11:53:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni9cg-0003ed-Gg
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 11:53:07 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:55065
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni9cg-0003eX-Cc
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 11:53:06 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ni9cg-0001LT-38
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 16:53:06 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Ni9cf-0000Vc-R2
	for myserver-commit@gnu.org; Thu, 18 Feb 2010 16:53:06 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f94f2ccdd45fc7d0ebb4f41f125f706df0d755f4
X-Git-Newrev: b5c07e87e944324e3870d63b10115b87d45345f9
Message-Id: <E1Ni9cf-0000Vc-R2@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 18 Feb 2010 16:53:05 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-8-gb5c07e8
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Feb 2010 16:53:09 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b5c07e87e944324e3870d63b10115b87d45345f9 (commit)
      from  f94f2ccdd45fc7d0ebb4f41f125f706df0d755f4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b5c07e87e944324e3870d63b10115b87d45345f9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Feb 18 17:51:25 2010 +0100

    Rename FilesUtility::fileExists to nodeExists and change its semantic.
    
    Now FilesUtility::nodeExists return nonzero for any type of file, not
    only regular files and directories.

diff --git a/myserver/include/base/file/files_utility.h b/myserver/include/base/file/files_utility.h
index b2207d4..77e06a6 100644
--- a/myserver/include/base/file/files_utility.h
+++ b/myserver/include/base/file/files_utility.h
@@ -65,9 +65,9 @@ public:
 
   static int getShortFileName (char*,char*,int);
 
-  static int fileExists (const char * );
-  static int fileExists (string const &file)
-  {return fileExists (file.c_str ());}
+  static int nodeExists (const char * );
+  static int nodeExists (string const &file)
+  {return nodeExists (file.c_str ());}
 
   static int deleteFile (const char * );
   static int deleteFile (string const &file)
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index cc91636..90f50fa 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -229,7 +229,7 @@ const char *File::getFilename ()
  */
 int File::createTemporaryFile (const char* filename)
 {
-  if (FilesUtility::fileExists (filename))
+  if (FilesUtility::nodeExists (filename))
     FilesUtility::deleteFile (filename);
 
   return openFile (filename, File::READ
diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index 971aa9b..4915950 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -259,7 +259,7 @@ int FilesUtility::isLink (const char* filename)
   if (ret < 0)
     return 0;
 
-  return (S_ISLNK (F_Stats.st_mode))? 1 : 0;
+  return S_ISLNK (F_Stats.st_mode) ? 1 : 0;
 #endif
 
 }
@@ -268,7 +268,7 @@ int FilesUtility::isLink (const char* filename)
  * Returns a non-null value if the given path is a valid file.
  * \param filename The path to check.
  */
-int FilesUtility::fileExists (const char* filename)
+int FilesUtility::nodeExists (const char* filename)
 {
 #ifdef WIN32
   HANDLE hFile = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ,
@@ -283,8 +283,8 @@ int FilesUtility::fileExists (const char* filename)
   int ret = stat (filename, &fstats);
   if (ret < 0)
     return 0;
-  /*! Return 1 if it is a regular file or a directory.  */
-  return (S_ISREG (fstats.st_mode) | S_ISDIR (fstats.st_mode))? 1 : 0;
+
+  return 1;
 #endif
 }
 
diff --git a/myserver/src/base/home_dir/home_dir.cpp b/myserver/src/base/home_dir/home_dir.cpp
index 90b346c..23db24a 100644
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -237,7 +237,7 @@ int HomeDir::getHomeDir (string& userName, string& out)
   out.assign (data);
   out.append ("/");
   out.append (userName);
-  return FilesUtility::fileExists (out.c_str ()) ? 0 : 1;
+  return FilesUtility::nodeExists (out.c_str ()) ? 0 : 1;
 #elif HAVE_GETPWNAM
   struct passwd *p;
   int ret = 0;
diff --git a/myserver/src/base/ssl/ssl.cpp b/myserver/src/base/ssl/ssl.cpp
index 0a6dd3b..e175b86 100644
--- a/myserver/src/base/ssl/ssl.cpp
+++ b/myserver/src/base/ssl/ssl.cpp
@@ -65,7 +65,7 @@ int SslContext::initialize ()
   /*
    * The specified file doesn't exist.
    */
-  if (FilesUtility::fileExists (certificateFile.c_str ()) == 0)
+  if (FilesUtility::nodeExists (certificateFile.c_str ()) == 0)
     return -1;
 
   if (SSL_CTX_use_certificate_file (context, certificateFile.c_str (),
@@ -75,7 +75,7 @@ int SslContext::initialize ()
   /*
    * The specified file doesn't exist.
    */
-  if (FilesUtility::fileExists (privateKeyFile) == 0)
+  if (FilesUtility::nodeExists (privateKeyFile) == 0)
     return -1;
 
   if (SSL_CTX_use_PrivateKey_file (context, privateKeyFile.c_str (),
diff --git a/myserver/src/base/xml/xml_parser.cpp b/myserver/src/base/xml/xml_parser.cpp
index b4845d9..efbe0f6 100644
--- a/myserver/src/base/xml/xml_parser.cpp
+++ b/myserver/src/base/xml/xml_parser.cpp
@@ -86,7 +86,7 @@ int XmlParser::open (const char* filename, bool useXpath)
   cur = NULL;
   this->useXpath = useXpath;
 
-  if (!FilesUtility::fileExists (filename))
+  if (!FilesUtility::nodeExists (filename))
     return -1;
 
   if (doc!= NULL)
diff --git a/myserver/src/conf/security/security_cache.cpp b/myserver/src/conf/security/security_cache.cpp
index d1e7398..e8d7e89 100644
--- a/myserver/src/conf/security/security_cache.cpp
+++ b/myserver/src/conf/security/security_cache.cpp
@@ -107,7 +107,7 @@ int SecurityCache::getSecurityFile (const string& dir,
   secFile.append (secFileName);
 
   /* The security file exists in the directory.  */
-  if (FilesUtility::fileExists (secFile))
+  if (FilesUtility::nodeExists (secFile))
   {
     out.assign (secFile);
     return 0;
@@ -136,14 +136,14 @@ int SecurityCache::getSecurityFile (const string& dir,
       out.assign (sys);
       out.append ("/");
       out.append (secFileName);
-      return !FilesUtility::fileExists (out);
+      return !FilesUtility::nodeExists (out);
     }
 
     secFile.assign (file);
     secFile.append ("/");
     secFile.append (secFileName);
 
-    found = FilesUtility::fileExists (secFile);
+    found = FilesUtility::nodeExists (secFile);
   }
 
   out.assign (secFile);
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index c647554..1b887d4 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -87,7 +87,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
 
   td->scriptPath.assign (scriptpath);
 
-  if (!FilesUtility::fileExists (scriptpath))
+  if (!FilesUtility::nodeExists (scriptpath))
     return td->http->raiseHTTPError (404);
 
   int subString = cgipath[0] == '"';
@@ -174,7 +174,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
     }
   else
     {
-      if (!FilesUtility::fileExists (tmpCgiPath.c_str ()))
+      if (!FilesUtility::nodeExists (tmpCgiPath.c_str ()))
         {
           if (tmpCgiPath.length () > 0)
             td->connection->host->warningsLogWrite (_("Cgi: cannot find the %s file")),
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 0bf2218..e59ca9d 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -54,7 +54,7 @@ int HttpFile::putFile (HttpThreadContext* td, string& filename)
     if (!(td->permissions & MYSERVER_PERMISSION_WRITE))
       return td->http->sendAuth ();
 
-    if (FilesUtility::fileExists (td->filenamePath.c_str ()))
+    if (FilesUtility::nodeExists (td->filenamePath.c_str ()))
       {
         File file;
         if (file.openFile (td->filenamePath.c_str (), File::OPEN_IF_EXISTS
@@ -156,7 +156,7 @@ int HttpFile::deleteFile (HttpThreadContext* td,
       if (!(td->permissions & MYSERVER_PERMISSION_DELETE))
         return td->http->sendAuth ();
 
-      if (FilesUtility::fileExists (td->filenamePath))
+      if (FilesUtility::nodeExists (td->filenamePath))
         {
           FilesUtility::deleteFile (td->filenamePath.c_str ());
           return td->http->raiseHTTPError (202);
@@ -232,7 +232,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
       if (!(td->permissions & MYSERVER_PERMISSION_READ))
         return td->http->sendAuth ();
 
-      if (!FilesUtility::fileExists (filenamePath))
+      if (!FilesUtility::nodeExists (filenamePath))
         return td->http->raiseHTTPError (404);
 
       lastMT = FilesUtility::getLastModTime (td->filenamePath.c_str ());
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index d4bef52..8122d43 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -89,7 +89,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
     return td->http->sendAuth ();
 
-  if (!FilesUtility::fileExists (scriptpath))
+  if (!FilesUtility::nodeExists (scriptpath))
     return td->http->raiseHTTPError (404);
 
   FilesUtility::splitPath (scriptpath, pathname, execname);
@@ -260,7 +260,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   /*
    *Create the out file.
    */
-  if (!FilesUtility::fileExists (outFilePath))
+  if (!FilesUtility::nodeExists (outFilePath))
     {
       ret = OutFileHandle.openFile (outFilePath, File::FILE_CREATE_ALWAYS);
       if (ret)
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index c61acf7..4f58c70 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -230,7 +230,7 @@ int loadExternalPath (string &externalPath)
 #ifdef WIN32
       externalPath.assign ("plugins");
 #else
-      if (FilesUtility::fileExists ("plugins"))
+      if (FilesUtility::nodeExists ("plugins"))
         externalPath.assign ("plugins");
       else
         {
@@ -263,7 +263,7 @@ int loadConfFileLocation (string &outFile, string fileName, const char *dir)
 
 #ifdef WIN32
       outFile = fileName;
-      return FilesUtility::fileExists (fileName) ? 0 : -1;
+      return FilesUtility::nodeExists (fileName) ? 0 : -1;
 #else
 
       if (dir)
@@ -273,7 +273,7 @@ int loadConfFileLocation (string &outFile, string fileName, const char *dir)
             outFile += "/";
 
           outFile += fileName;
-          return !FilesUtility::fileExists (outFile);
+          return !FilesUtility::nodeExists (outFile);
         }
 
       /* Look for .xml files in the following order:
@@ -282,18 +282,18 @@ int loadConfFileLocation (string &outFile, string fileName, const char *dir)
          2) ~/.myserver/
          3) /etc/myserver/
       */
-      if (FilesUtility::fileExists (fileName))
+      if (FilesUtility::nodeExists (fileName))
         {
           outFile = fileName;
           return 0;
         }
 
       outFile = "~/.myserver/" + fileName;
-      if (FilesUtility::fileExists (outFile))
+      if (FilesUtility::nodeExists (outFile))
         return 0;
 
       outFile = "/etc/myserver/" + fileName;
-      if (FilesUtility::fileExists (outFile))
+      if (FilesUtility::nodeExists (outFile))
         return 0;
 #endif
     }
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index bc31a78..1a62d86 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -1463,7 +1463,7 @@ bool Ftp::getLocalPath (const std::string & sPath, std::string & sOutPath)
     return false;
 
   if (sOutPath.empty () ||
-      !FilesUtility::fileExists (sOutPath) ||
+      !FilesUtility::nodeExists (sOutPath) ||
       FilesUtility::isLink (sOutPath.c_str ()))
     {
       ftpReply (550);
@@ -2194,7 +2194,7 @@ void Ftp::stou (const std::string & sPath)
         return;
       nCount++;
     }
-  while (FilesUtility::fileExists (sOutPath));
+  while (FilesUtility::nodeExists (sOutPath));
   retrstor (false, false, sOutPath);
 }
 
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 2c0cdb5..2b94ec3 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -520,7 +520,7 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
           if (next >= filenamePathLen)
             break;
 
-          if (mimeLoc || (FilesUtility::fileExists (curr.c_str ())
+          if (mimeLoc || (FilesUtility::nodeExists (curr.c_str ())
                           && !FilesUtility::isDirectory (curr.c_str ())))
             {
               td->pathInfo.assign (&(td->filenamePath.c_str ()[next]));
@@ -1425,7 +1425,7 @@ int Http::raiseHTTPError (int ID)
           HttpErrors::getErrorPage (ID, page);
           errorFile << td->getVhostSys () << "/" << page;
 
-          if (FilesUtility::fileExists (errorFile.str ().c_str ()))
+          if (FilesUtility::nodeExists (errorFile.str ().c_str ()))
             {
               string errorFileStr = errorFile.str ();
               return sendHTTPResource (errorFileStr, 1, td->onlyHeader);
@@ -1645,7 +1645,7 @@ int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
           defaultFileName.clear ();
           defaultFileName << td->filenamePath << "/" << *file;
 
-          if (FilesUtility::fileExists (defaultFileName.str ().c_str ()))
+          if (FilesUtility::nodeExists (defaultFileName.str ().c_str ()))
             {
               ostringstream nUrl;
 
diff --git a/myserver/tests/test_fork_server.cpp b/myserver/tests/test_fork_server.cpp
index bc295e9..dcc6378 100644
--- a/myserver/tests/test_fork_server.cpp
+++ b/myserver/tests/test_fork_server.cpp
@@ -89,7 +89,7 @@ public:
         spi.stdError = -1;
         spi.stdOut =  pipe.getWriteHandle ();
 
-        if (!FilesUtility::fileExists ("/bin/echo"))
+        if (!FilesUtility::nodeExists ("/bin/echo"))
           return;
 
         spi.cmd.assign ("/bin/echo");
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index 0ce109a..4abd19a 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -91,26 +91,22 @@ public:
     string path;
     FilesUtility::temporaryFileName (0, path);
 
-
     CPPUNIT_ASSERT (sock->socket ());
 
-    //FIXME: find a better place inside FilesUtility.
-    struct stat F_Stats;
-    ret = stat (path.c_str (), &F_Stats);
-    CPPUNIT_ASSERT (ret);
-    /////////////////////////////////////////////////
+    ret = FilesUtility::nodeExists (path.c_str ());
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
 
     CPPUNIT_ASSERT_EQUAL (sock->bind (path.c_str ()), 0);
 
-    ret = stat (path.c_str (), &F_Stats);
-    CPPUNIT_ASSERT_EQUAL (ret, 0);
+    ret = FilesUtility::nodeExists (path.c_str ());
+    CPPUNIT_ASSERT (ret);
 
     CPPUNIT_ASSERT_EQUAL (sock->shutdown (), 0);
 
     CPPUNIT_ASSERT_EQUAL (sock->close (), 0);
 
-    ret = stat (path.c_str (), &F_Stats);
-    CPPUNIT_ASSERT (ret);
+    ret = FilesUtility::nodeExists (path.c_str ());
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
   }
 
   void testClient ()

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/file/files_utility.h        |    6 +++---
 myserver/src/base/file/file.cpp                   |    2 +-
 myserver/src/base/file/files_utility.cpp          |    8 ++++----
 myserver/src/base/home_dir/home_dir.cpp           |    2 +-
 myserver/src/base/ssl/ssl.cpp                     |    4 ++--
 myserver/src/base/xml/xml_parser.cpp              |    2 +-
 myserver/src/conf/security/security_cache.cpp     |    6 +++---
 myserver/src/http_handler/cgi/cgi.cpp             |    4 ++--
 myserver/src/http_handler/http_file/http_file.cpp |    6 +++---
 myserver/src/http_handler/wincgi/wincgi.cpp       |    4 ++--
 myserver/src/myserver.cpp                         |   12 ++++++------
 myserver/src/protocol/ftp/ftp.cpp                 |    4 ++--
 myserver/src/protocol/http/http.cpp               |    6 +++---
 myserver/tests/test_fork_server.cpp               |    2 +-
 myserver/tests/test_unix_socket.cpp               |   16 ++++++----------
 15 files changed, 40 insertions(+), 44 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 19 05:24:55 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NiQ2Y-0002wz-TE
	for mharc-myserver-commit@gnu.org; Fri, 19 Feb 2010 05:24:55 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NiQ2X-0002wM-OA
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 05:24:53 -0500
Received: from [140.186.70.92] (port=47853 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NiQ2V-0002vH-SM
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 05:24:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiQ2V-0007s8-08
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 05:24:51 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:33555
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiQ2U-0007s4-SM
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 05:24:50 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiQ2U-0005Xy-Qu
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 10:24:50 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NiQ2U-0004L7-5y
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 10:24:50 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b5c07e87e944324e3870d63b10115b87d45345f9
X-Git-Newrev: c382a8224b8fc000aadb6a7d9f630ff894b62a21
Message-Id: <E1NiQ2U-0004L7-5y@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 19 Feb 2010 10:24:50 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-10-gc382a82
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Feb 2010 10:24:54 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  c382a8224b8fc000aadb6a7d9f630ff894b62a21 (commit)
       via  bff4636d7c9d71f782a78195e7381be919152d91 (commit)
      from  b5c07e87e944324e3870d63b10115b87d45345f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit c382a8224b8fc000aadb6a7d9f630ff894b62a21
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 11:23:33 2010 +0100

    Use 127.0.0.1 instead of localhost to avoid a lookup.

diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 13c39b2..cf1618e 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -401,7 +401,7 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
   MYSERVER_SOCKADDRIN serverSockAddrIn;
   int addrLen = sizeof (serverSockAddrIn);
 
-  server->host.assign ("localhost");
+  server->host.assign ("127.0.0.1");
   server->isLocal = true;
 
   if (nServers >= maxServers)
@@ -461,13 +461,12 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
   spi.uid = uid;
   spi.gid = gid;
 
-  if (Process::getForkServer ()->isInitialized ())
+  ForkServer *forkServer = Process::getForkServer ();
+  if (forkServer->isInitialized ())
     {
       int ret, port, pid;
-      ret = Process::getForkServer ()->executeProcess (&spi,
-                                                       ForkServer::FLAG_STDIN_SOCKET,
-                                                       &pid,
-                                                       &port);
+      ret = forkServer->executeProcess (&spi, ForkServer::FLAG_STDIN_SOCKET,
+                                        &pid, &port);
 
       if (ret == 0)
         {
@@ -500,12 +499,12 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
     }
 
   server->DESCRIPTOR.fileHandle = (unsigned long) server->socket.getHandle ();
-  spi.stdIn = (FileHandle)server->DESCRIPTOR.fileHandle;
+  spi.stdIn = (FileHandle) server->DESCRIPTOR.fileHandle;
 
   if (server->socket.getsockname (&serverSockAddrIn, &addrLen))
     return -1;
 
-  server->port = ntohs (((sockaddr_in *)&serverSockAddrIn)->sin_port);
+  server->port = ntohs (((sockaddr_in *) &serverSockAddrIn)->sin_port);
 
   server->process.exec (&spi);
   server->socket.close ();
@@ -525,7 +524,7 @@ int ProcessServerManager::connect (Socket* sock,
   socklen_t nLength = sizeof (MYSERVER_SOCKADDRIN);
 
   if (server->socket.getHandle ())
-    server->socket.getsockname ((MYSERVER_SOCKADDR*)&serverSock, (int*)&nLength);
+    server->socket.getsockname ((MYSERVER_SOCKADDR*) &serverSock, (int*) &nLength);
 
   if (!serverSock.ss_family || serverSock.ss_family == AF_INET || !server->isLocal)
   {
@@ -539,7 +538,6 @@ int ProcessServerManager::connect (Socket* sock,
       sock->close ();
       return -1;
     }
-
   }
 #if ( HAVE_IPV6 && false )/* IPv6 communication not implemented yet by php.  */
   else if ( serverSock.ss_family == AF_INET6 )
@@ -554,7 +552,7 @@ int ProcessServerManager::connect (Socket* sock,
       return -1;
     }
   }
-#endif // HAVE_IPV6
+#endif /* HAVE_IPV6  */
   sock->setNonBlocking (1);
 
   return 0;



commit bff4636d7c9d71f782a78195e7381be919152d91
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 10:15:24 2010 +0100

    Add a new mode to open temporary files, TEMPORARY_DELAYED.
    
    When this mode is used, the unlink is done just before the close, thus
    the file is accessible trough the file system during its life.

diff --git a/myserver/include/base/file/file.h b/myserver/include/base/file/file.h
index f53abac..016e308 100644
--- a/myserver/include/base/file/file.h
+++ b/myserver/include/base/file/file.h
@@ -34,6 +34,7 @@ class File : public Stream
 public:
   static const u_long READ;
   static const u_long WRITE;
+  static const u_long TEMPORARY_DELAYED;
   static const u_long TEMPORARY;
   static const u_long HIDDEN;
   static const u_long FILE_OPEN_ALWAYS;
@@ -48,10 +49,10 @@ public:
 
   virtual Handle getHandle ();
   virtual int setHandle (Handle);
-  virtual int writeToFile (const char* ,u_long ,u_long* );
-  virtual int createTemporaryFile (const char* );
+  virtual int writeToFile (const char *, u_long , u_long *);
+  virtual int createTemporaryFile (const char *, bool unlink = true);
 
-  virtual int openFile (const char*, u_long );
+  virtual int openFile (const char *, u_long);
   virtual int openFile (string const &file, u_long opt)
   {return openFile (file.c_str (), opt);}
 
@@ -70,7 +71,7 @@ public:
   virtual int operator =(File);
   virtual int close ();
 
-  /*! Inherithed from Stream. */
+  /* Inherithed from Stream.  */
   virtual int read (char* buffer, u_long len, u_long *nbr);
   virtual int write (const char* buffer, u_long len, u_long *nbw);
 
@@ -78,7 +79,12 @@ public:
                                 MemBuf *buf, u_long *nbw);
 
   int truncate (u_long size = 0);
+
+  /*! Get the options mask used with openFile.  */
+  u_long getOpenOptions (){return opt;}
 protected:
+  /* Options used by open.  */
+  u_long opt;
   FileHandle handle;
   string filename;
 };
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 90f50fa..0f5c0b8 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -52,15 +52,16 @@ extern "C"
 
 using namespace std;
 
-const u_long File::READ = (1<<0);
-const u_long File::WRITE = (1<<1);
-const u_long File::TEMPORARY = (1<<2);
-const u_long File::HIDDEN = (1<<3);
-const u_long File::FILE_OPEN_ALWAYS = (1<<4);
-const u_long File::OPEN_IF_EXISTS = (1<<5);
-const u_long File::APPEND = (1<<6);
-const u_long File::FILE_CREATE_ALWAYS = (1<<7);
-const u_long File::NO_INHERIT = (1<<8);
+const u_long File::READ = (1 << 0);
+const u_long File::WRITE = (1 << 1);
+const u_long File::TEMPORARY = (1 << 2);
+const u_long File::TEMPORARY_DELAYED = (1 << 3);
+const u_long File::HIDDEN = (1 << 4);
+const u_long File::FILE_OPEN_ALWAYS = (1 << 5);
+const u_long File::OPEN_IF_EXISTS = (1 << 6);
+const u_long File::APPEND = (1 << 7);
+const u_long File::FILE_CREATE_ALWAYS = (1 << 8);
+const u_long File::NO_INHERIT = (1 << 9);
 
 
 /*!
@@ -137,7 +138,7 @@ int File::truncate (u_long size)
  *\param opt Specify how open the file.
  *openFile returns 0 if the call was successful, any other value on errors.
  */
-int File::openFile (const char* nfilename,u_long opt)
+int File::openFile (const char* nfilename, u_long opt)
 {
   struct stat fStats;
   int flags;
@@ -166,11 +167,20 @@ int File::openFile (const char* nfilename,u_long opt)
     handle = open (filename.c_str (), O_CREAT | flags, S_IRUSR | S_IWUSR);
 
   if (opt & File::FILE_CREATE_ALWAYS)
-    truncate ();
-
+    if (truncate ())
+      {
+        close ();
+        return -1;
+      }
+ 
   if (opt & File::TEMPORARY)
-    unlink (filename.c_str ()); /* It will be removed on close.  */
+    if (unlink (filename.c_str ()))
+      {
+        close ();
+        return -1;
+      }
 
+  this->opt = opt;
   return handle < 0;
 }
 
@@ -224,19 +234,19 @@ const char *File::getFilename ()
 }
 
 /*!
- *Create a temporary file.
- *\param filename The new temporary file name.
+ * Create a temporary file.
+ * \param filename The new temporary file name.
+ * \param unlink Unlink the inode immediately, not before close.
  */
-int File::createTemporaryFile (const char* filename)
+int File::createTemporaryFile (const char* filename, bool unlink)
 {
   if (FilesUtility::nodeExists (filename))
     FilesUtility::deleteFile (filename);
 
-  return openFile (filename, File::READ
-                  | File::WRITE
-                  | File::FILE_CREATE_ALWAYS
-                  | File::TEMPORARY
-                  | File::NO_INHERIT);
+  u_long temporaryOpt = unlink ? File::TEMPORARY : File::TEMPORARY_DELAYED;
+
+  return openFile (filename, File::READ | File::WRITE | File::NO_INHERIT
+                   | File::FILE_CREATE_ALWAYS | temporaryOpt);
 }
 
 /*!
@@ -247,11 +257,15 @@ int File::close ()
   int ret = 0;
   if (handle != -1)
     {
+      if (opt & File::TEMPORARY_DELAYED)
+        unlink (filename.c_str ());
       ret = fsync (handle);
       ret |= ::close (handle);
     }
+
   filename.clear ();
   handle = -1;
+
   return ret;
 }
 
diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index a45dd06..1eb49b8 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -38,8 +38,8 @@ class TestFile : public CppUnit::TestFixture
   string fname;
 
   CPPUNIT_TEST_SUITE (TestFile);
-
   CPPUNIT_TEST (testCreateTemporaryFile);
+  CPPUNIT_TEST (testCreateTemporaryDelayedFile);
   CPPUNIT_TEST (testOnFile);
   CPPUNIT_TEST (testBinary);
   CPPUNIT_TEST (testTruncate);
@@ -68,11 +68,36 @@ public:
     FilesUtility::deleteFile (fname);
   }
 
+  void testCreateTemporaryDelayedFile ()
+  {
+    int ret = tfile->createTemporaryFile (fname.c_str (), false);
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
+
+    /* The unlink is done just before the close, the file can be stat'ed. */
+    ret = FilesUtility::nodeExists (fname.c_str ());
+    CPPUNIT_ASSERT (ret);
+
+    ret = tfile->close ();
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
+
+    ret = FilesUtility::nodeExists (fname.c_str ());
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
+  }
+
   void testCreateTemporaryFile ()
   {
-    CPPUNIT_ASSERT_EQUAL (tfile->createTemporaryFile (fname.c_str ()), 0);
+    int ret = tfile->createTemporaryFile (fname.c_str (), true);
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
 
-    CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
+    /* Using unlink the file can't be stat'ed at this point.  */
+    ret = FilesUtility::nodeExists (fname.c_str ());
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
+
+    ret = tfile->close ();
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
+
+    ret = FilesUtility::nodeExists (fname.c_str ());
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
   }
 
   void testOnFile ()

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/file/file.h                  |   14 ++++--
 myserver/src/base/file/file.cpp                    |   56 ++++++++++++-------
 .../src/base/process/process_server_manager.cpp    |   20 +++----
 myserver/tests/test_file.cpp                       |   31 ++++++++++-
 4 files changed, 82 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 19 09:48:20 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NiU9T-00020h-SY
	for mharc-myserver-commit@gnu.org; Fri, 19 Feb 2010 09:48:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NiU9R-000209-Gd
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 09:48:17 -0500
Received: from [140.186.70.92] (port=52759 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NiU9Q-0001zc-10
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 09:48:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiU9O-000854-Ro
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 09:48:15 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:54659
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiU9O-000850-OU
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 09:48:14 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiU9O-0000HW-Lw
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 14:48:14 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NiU9O-0001Wp-2T
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 14:48:14 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c382a8224b8fc000aadb6a7d9f630ff894b62a21
X-Git-Newrev: 542891e6822b2e087eab85bdeffca8cd38a10637
Message-Id: <E1NiU9O-0001Wp-2T@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 19 Feb 2010 14:48:14 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-13-g542891e
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Feb 2010 14:48:17 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  542891e6822b2e087eab85bdeffca8cd38a10637 (commit)
       via  2266681e100b2229e104b0b75945abfe81e0f1e8 (commit)
       via  96f3660d8c508bf0a42fc286910ef54e62658428 (commit)
      from  c382a8224b8fc000aadb6a7d9f630ff894b62a21 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 542891e6822b2e087eab85bdeffca8cd38a10637
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 15:45:06 2010 +0100

    Use "::1" in place of "127.0.0.1" when IPv6 is enabled.
    
    Reported by: Alexandru Iancu <alexandru.iancu@gmail.com>

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index c65752a..0146039 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -55,6 +55,12 @@ typedef int SocketHandle;
 #  define MAX_IP_STRING_LEN  32
 # endif
 
+# if HAVE_IPV6
+#  define LOCALHOST_ADDRESS "::1"
+# else
+#  define LOCALHOST_ADDRESS "127.0.0.1"
+# endif
+
 typedef struct sockaddr_storage MYSERVER_SOCKADDR_STORAGE;
 typedef struct sockaddr_storage MYSERVER_SOCKADDRIN;
 typedef struct sockaddr_storage MYSERVER_SOCKADDR;
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index cf1618e..9e55079 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -18,7 +18,7 @@
 #include "myserver.h"
 
 #include <include/base/process/process_server_manager.h>
-
+#include <include/base/socket/socket.h>
 #include <include/server/server.h>
 #include <include/base/process/process.h>
 #include <string>
@@ -401,7 +401,7 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
   MYSERVER_SOCKADDRIN serverSockAddrIn;
   int addrLen = sizeof (serverSockAddrIn);
 
-  server->host.assign ("127.0.0.1");
+  server->host.assign (LOCALHOST_ADDRESS);
   server->isLocal = true;
 
   if (nServers >= maxServers)
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index 70dadc6..27b81f5 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -296,11 +296,11 @@ int Socket::getLocalIPsList (string &out)
       for (i = 0; (localhe->h_addr_list[i]); i++)
         {
 # ifdef WIN32
-          ia.S_un.S_addr = *((u_long FAR*) (localhe->h_addr_list[i]));
+          ia.S_un.S_addr = *((u_long FAR *) (localhe->h_addr_list[i]));
 # else
           ia.s_addr = *((u_long *) (localhe->h_addr_list[i]));
 # endif
-          stream << ( (i != 0) ? ", " : "") << inet_ntoa (ia);
+          stream << ((i != 0) ? ", " : "") << inet_ntoa (ia);
         }
 
       out.assign (stream.str ());
@@ -308,7 +308,7 @@ int Socket::getLocalIPsList (string &out)
     }
   else
     {
-      out.assign ("127.0.0.1");
+      out.assign (LOCALHOST_ADDRESS);
       return 0;
     }
 #endif//HAVE_IPV6
@@ -353,7 +353,7 @@ int Socket::send (const char* buffer, int len, int flags)
         /*! On errors returns directly -1.  */
         if (ret < 0)
           return -1;
-        toSend -= (u_long)ret;
+        toSend -= (u_long) ret;
         /*!
          *If there are other bytes to send wait before cycle again.
          */
diff --git a/myserver/tests/test_connection.cpp b/myserver/tests/test_connection.cpp
index ba7fbcf..30fea07 100644
--- a/myserver/tests/test_connection.cpp
+++ b/myserver/tests/test_connection.cpp
@@ -18,6 +18,7 @@
 #include "myserver.h"
 #include <ctype.h>
 
+#include "../include/base/socket/socket.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
@@ -87,8 +88,8 @@ public:
 
   void testIpAddress ()
   {
-    connection->setIpAddr ("127.0.0.1");
-    CPPUNIT_ASSERT (strcmp (connection->getIpAddr (), "127.0.0.1") == 0);
+    connection->setIpAddr (LOCALHOST_ADDRESS);
+    CPPUNIT_ASSERT (strcmp (connection->getIpAddr (), LOCALHOST_ADDRESS) == 0);
   }
 
   void testActiveThread ()
@@ -104,8 +105,8 @@ public:
 
   void testLocalIpAddress ()
   {
-    connection->setLocalIpAddr ("127.0.0.1");
-    CPPUNIT_ASSERT (strcmp (connection->getLocalIpAddr (), "127.0.0.1") == 0);
+    connection->setLocalIpAddr (LOCALHOST_ADDRESS);
+    CPPUNIT_ASSERT (strcmp (connection->getLocalIpAddr (), LOCALHOST_ADDRESS) == 0);
   }
 
   void testTries ()
diff --git a/myserver/tests/test_log_manager.cpp b/myserver/tests/test_log_manager.cpp
index 67ada1d..27afaf3 100644
--- a/myserver/tests/test_log_manager.cpp
+++ b/myserver/tests/test_log_manager.cpp
@@ -32,6 +32,7 @@
 #include <include/log/log_manager.h>
 #include <include/filter/filters_factory.h>
 #include <include/base/file/files_utility.h>
+#include <include/base/socket/socket.h>
 #include <include/base/file/file.h>
 #include <include/base/utility.h>
 #include <include/filter/gzip/gzip.h>
@@ -509,7 +510,8 @@ public:
 
     filters.push_back ("not_existing_filter");
 
-    CPPUNIT_ASSERT (lm->add (this, "test", "socket://127.0.0.1:6666", filters, 0));
+    CPPUNIT_ASSERT (lm->add (this, "test", "socket://" LOCALHOST_ADDRESS ":6666",
+                             filters, 0));
   }
 
   void testConsoleStreamAddWithNotExistingFilter ()
diff --git a/myserver/tests/test_log_stream_factory.cpp b/myserver/tests/test_log_stream_factory.cpp
index 367f023..3d4886b 100644
--- a/myserver/tests/test_log_stream_factory.cpp
+++ b/myserver/tests/test_log_stream_factory.cpp
@@ -24,6 +24,7 @@
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#include <include/base/socket/socket.h>
 #include <include/log/stream/log_stream_factory.h>
 #include <include/filter/filters_factory.h>
 
@@ -54,7 +55,7 @@ public:
   {
     CPPUNIT_ASSERT (!lsf->getPath ("foo:bla").size ());
     CPPUNIT_ASSERT (!lsf->getPath ("foo://bar").size ());
-    CPPUNIT_ASSERT (lsf->getPath ("socket://127.0.0.1:0").size ());
+    CPPUNIT_ASSERT (lsf->getPath ("socket://" LOCALHOST_ADDRESS ":0").size ());
   }
 
   void testCreation ()
@@ -68,7 +69,8 @@ public:
     CPPUNIT_ASSERT (!ls);
     ls = lsf->create (&ff, "console://stdout", filters, 0);
     CPPUNIT_ASSERT (ls);
-    CPPUNIT_ASSERT (!lsf->create (&ff, "socket://127.0.0.1:0", filters, 0));
+    CPPUNIT_ASSERT (!lsf->create (&ff, "socket://" LOCALHOST_ADDRESS ":0",
+                                  filters, 0));
     delete ls;
   }
 
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index 326917c..385984c 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -95,7 +95,7 @@ public:
     int status;
 
     ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
-    ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
+    ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr (LOCALHOST_ADDRESS);
     ((sockaddr_in*) (&sockIn))->sin_port = htons (arg.port);
 
     socklen_t sockInLen = sizeof (sockaddr_in);
@@ -178,7 +178,7 @@ static DEFINE_THREAD (testRecvClient, pParam)
     {
       int ret;
       Socket *obj2 = new Socket;
-      char host[] = "127.0.0.1";
+      char host[] = LOCALHOST_ADDRESS;
 
       ret = obj2->socket (AF_INET, SOCK_STREAM, 0);
       CPPUNIT_ASSERT (ret != -1);
diff --git a/myserver/tests/test_socket_stream_creator.cpp b/myserver/tests/test_socket_stream_creator.cpp
index 1f37c27..abc53df 100644
--- a/myserver/tests/test_socket_stream_creator.cpp
+++ b/myserver/tests/test_socket_stream_creator.cpp
@@ -46,7 +46,7 @@ public:
   void testCreation ()
   {
     list<string> filters;
-    LogStream* ls = ssc->create (ff, "127.0.0.1:0", filters, 0);
+    LogStream* ls = ssc->create (ff, LOCALHOST_ADDRESS ":0", filters, 0);
     CPPUNIT_ASSERT (!ls);
   }
 
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 5a1ba0a..a65d618 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -25,11 +25,12 @@
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
-#include "../include/base/socket/ssl_socket.h"
-#include "../include/base/file/file.h"
-#include "../include/base/file/files_utility.h"
-#include "../include/base/thread/thread.h"
-#include "../include/base/utility.h"
+#include <include/base/socket/socket.h>
+#include <include/base/socket/ssl_socket.h>
+#include <include/base/file/file.h>
+#include <include/base/file/files_utility.h>
+#include <include/base/thread/thread.h>
+#include <include/base/utility.h>
 
 extern "C"
 {
@@ -144,7 +145,7 @@ public:
     int status;
 
     ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
-    ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
+    ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr (LOCALHOST_ADDRESS);
     ((sockaddr_in*) (&sockIn))->sin_port = htons (port);
 
     socklen_t sockInLen = sizeof (sockaddr_in);
@@ -234,7 +235,7 @@ static DEFINE_THREAD (testSslRecvClient, pParam)
   MYSERVER_SOCKADDRIN sockIn = { 0 };
 
   ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
-  ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ("127.0.0.1");
+  ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr (LOCALHOST_ADDRESS);
   ((sockaddr_in*) (&sockIn))->sin_port = htons (arg->port);
 
   int sockInLen = sizeof (struct sockaddr_in);



commit 2266681e100b2229e104b0b75945abfe81e0f1e8
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 15:31:24 2010 +0100

    Indent according to the coding style.

diff --git a/myserver/src/protocol/ftp/ftp_parser.ypp b/myserver/src/protocol/ftp/ftp_parser.ypp
index 3b9c3fd..618dd09 100755
--- a/myserver/src/protocol/ftp/ftp_parser.ypp
+++ b/myserver/src/protocol/ftp/ftp_parser.ypp
@@ -12,11 +12,12 @@
 %parse-param { Ftp *pContext }
 %locations
 
-%union {
-	int		m_nInt;
-	char		m_nChar;
-	char		m_szStr[PARSER_STR_LEN];
-	FtpHost 	m_host;
+%union
+{
+  int		m_nInt;
+  char		m_nChar;
+  char		m_szStr[PARSER_STR_LEN];
+  FtpHost 	m_host;
 }
 
 %{
@@ -361,85 +362,91 @@ format_control_code : 'n'
 
 int Ftp::parseControlConnection()
 {
-	if ( td.buffer == NULL || td.buffer->getBuffer() == NULL )
-		return ClientsThread::DELETE_CONNECTION;
-	FtpuserData *pFtpuserData = static_cast<FtpuserData *>(td.pConnection->protocolBuffer);
-	if ( pFtpuserData == NULL )
-		return ClientsThread::DELETE_CONNECTION;
-
-	// awaiting commands reply
-	if ( pFtpuserData->m_nFtpstate <= FtpuserData::NO_CONTROL_CONNECTION )
-	{
-		ftpReply(220);
-		pFtpuserData->m_nFtpstate = FtpuserData::CONTROL_CONNECTION_UP;
-	}
-
-	MemBuf out;
-	escapeTelnet(*td.buffer, out);
-	if ( !m_bEnablePipelining )
-	{
-		MemBuf tmpBuff(out);
-		removePipelinedCmds(tmpBuff, out);
-	}
-	char *pBuffToParse = out.getBuffer();
-
-	if ( pBuffToParse == NULL || td.buffersize <= td.m_nParseLength )// nothing to parse ...
-		return ClientsThread::KEEP_CONNECTION;
-	else
-		pBuffToParse += td.m_nParseLength;
-
-	yylex_init(&m_scanner);
-	yy_buffer_state *bufstate = yy_scan_string (pBuffToParse, m_scanner);
-	int nParserRet = yyparse(this);
-	yy_delete_buffer(bufstate, m_scanner);
-	yylex_destroy(m_scanner);
-	switch ( nParserRet )
-	{
-		case 0:
-			if ( pFtpuserData->m_nFtpstate == FtpuserData::NO_CONTROL_CONNECTION )
-				return ClientsThread::DELETE_CONNECTION;
-			else
-				return ClientsThread::KEEP_CONNECTION;
-		case 1:
-			// parsing failed because of invalid input!
-			return ClientsThread::DELETE_CONNECTION;
-		case 2:
-			// memory exhaustion!
-			return ClientsThread::DELETE_CONNECTION;
-	}//TODO: handle INCOMPLETE_REQUEST
-	return ClientsThread::DELETE_CONNECTION;
+  if (td.buffer == NULL || td.buffer->getBuffer() == NULL)
+    return ClientsThread::DELETE_CONNECTION;
+
+  FtpuserData *pFtpuserData = static_cast<FtpuserData *> (td.pConnection->protocolBuffer);
+  if (pFtpuserData == NULL)
+    return ClientsThread::DELETE_CONNECTION;
+
+  /* awaiting commands reply.  */
+  if (pFtpuserData->m_nFtpstate <= FtpuserData::NO_CONTROL_CONNECTION)
+    {
+      ftpReply (220);
+      pFtpuserData->m_nFtpstate = FtpuserData::CONTROL_CONNECTION_UP;
+    }
+
+  MemBuf out;
+  escapeTelnet (*td.buffer, out);
+  if (! m_bEnablePipelining)
+    {
+      MemBuf tmpBuff (out);
+      removePipelinedCmds (tmpBuff, out);
+    }
+  char *pBuffToParse = out.getBuffer ();
+
+  if (pBuffToParse == NULL || td.buffersize <= td.m_nParseLength )
+    return ClientsThread::KEEP_CONNECTION;
+  else
+    pBuffToParse += td.m_nParseLength;
+
+  yylex_init (&m_scanner);
+  yy_buffer_state *bufstate = yy_scan_string (pBuffToParse, m_scanner);
+  int nParserRet = yyparse (this);
+  yy_delete_buffer (bufstate, m_scanner);
+  yylex_destroy (m_scanner);
+
+  switch (nParserRet)
+    {
+    case 0:
+      if (pFtpuserData->m_nFtpstate == FtpuserData::NO_CONTROL_CONNECTION )
+        return ClientsThread::DELETE_CONNECTION;
+      else
+        return ClientsThread::KEEP_CONNECTION;
+
+    case 1:
+      /* Invalid input.  */
+      return ClientsThread::DELETE_CONNECTION;
+
+    case 2:
+      /* memory exhaustion!  */
+      return ClientsThread::DELETE_CONNECTION;
+    }
+  /*TODO: handle INCOMPLETE_REQUEST */
+  return ClientsThread::DELETE_CONNECTION;
 }
 
-u_long Ftp::computeParseLength(const YYLTYPE &location)
+u_long Ftp::computeParseLength (const YYLTYPE &location)
 {
-	if ( td.buffer == NULL )
-		return 1;
-	int nBuffLine = 1, nBuffCol = 0;
-	char *pszBuff = td.buffer->getBuffer();
-	for ( u_long i = 0; i < td.buffersize; i++ )
-	{
-		if ( pszBuff[i] == '\n' )
-		{
-			nBuffLine++;
-			nBuffCol = 0;
-		}
-		else
-			nBuffCol++;
-		if ( nBuffLine == location.last_line && nBuffCol == location.last_column )
-		{
-			td.m_nParseLength = i;
-			return 0;
-		}
-	}
-	return 1;//error
+  if (td.buffer == NULL)
+    return 1;
+
+  int nBuffLine = 1, nBuffCol = 0;
+  char *pszBuff = td.buffer->getBuffer ();
+  for (u_long i = 0; i < td.buffersize; i++)
+    {
+      if (pszBuff[i] == '\n')
+        {
+          nBuffLine++;
+          nBuffCol = 0;
+        }
+      else
+        nBuffCol++;
+      if (nBuffLine == location.last_line && nBuffCol == location.last_column)
+        {
+          td.m_nParseLength = i;
+          return 0;
+        }
+    }
+
+  return 1;
 }
 
-///////////////////////////////////////////////////////////
-// global fncs
+/* Global functions.  */
 
-void yyerror(YYLTYPE *pLoc, Ftp *pContext, const char *msg)
+void yyerror (YYLTYPE *pLoc, Ftp *pContext, const char *msg)
 {
-	if ( pContext == NULL )
-		return;
-	pContext->printError(msg);
+  if (pContext == NULL)
+    return;
+  pContext->printError (msg);
 }



commit 96f3660d8c508bf0a42fc286910ef54e62658428
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 15:23:18 2010 +0100

    The buffer length reflects the number of bytes ready for processing

diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index 4704956..bc78372 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -271,7 +271,7 @@ int ClientsThread::controlConnections ()
   if (err == -1 && !server->deleteConnection (c))
     return 0;
 
-  buffer.setRealLength (dataRead + err);
+  buffer.setLength (dataRead + err);
   c->setForceControl (0);
 
   /* Refresh with the right value.  */
@@ -295,26 +295,25 @@ int ClientsThread::controlConnections ()
   c->setActiveThread (this);
   try
   {
+    retcode = ClientsThread::DELETE_CONNECTION;
     if (c->hasContinuation ())
       {
-        retcode = c->getContinuation ()(c, (char*)buffer.getBuffer (),
-                                   (char*)auxiliaryBuffer.getBuffer (),
-                                   buffer.getRealLength (),
-                                   auxiliaryBuffer.getRealLength (),
-                                   nBytesToRead, id);
+        retcode = c->getContinuation ()(c, (char*) buffer.getBuffer (),
+                                   (char*) auxiliaryBuffer.getBuffer (),
+                                        buffer.getRealLength (),
+                                        auxiliaryBuffer.getRealLength (),
+                                        nBytesToRead, id);
         c->setContinuation (NULL);
       }
     else
       {
         protocol = server->getProtocol (c->host->getProtocolName ());
         if (protocol)
-          retcode = protocol->controlConnection (c, (char*)buffer.getBuffer (),
-                                           (char*)auxiliaryBuffer.getBuffer (),
-                                           buffer.getRealLength (),
-                                           auxiliaryBuffer.getRealLength (),
-                                           nBytesToRead, id);
-        else
-          retcode = ClientsThread::DELETE_CONNECTION;
+          retcode = protocol->controlConnection (c, (char*) buffer.getBuffer (),
+                                                 (char*) auxiliaryBuffer.getBuffer (),
+                                                 buffer.getRealLength (),
+                                                 auxiliaryBuffer.getRealLength (),
+                                                 nBytesToRead, id);
       }
   }
   catch (...)

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/socket/socket.h              |    6 +
 .../src/base/process/process_server_manager.cpp    |    4 +-
 myserver/src/base/socket/socket.cpp                |    8 +-
 myserver/src/protocol/ftp/ftp_parser.ypp           |  165 ++++++++++----------
 myserver/src/server/clients_thread.cpp             |   25 ++--
 myserver/tests/test_connection.cpp                 |    9 +-
 myserver/tests/test_log_manager.cpp                |    4 +-
 myserver/tests/test_log_stream_factory.cpp         |    6 +-
 myserver/tests/test_socket.cpp                     |    4 +-
 myserver/tests/test_socket_stream_creator.cpp      |    2 +-
 myserver/tests/test_ssl_socket.cpp                 |   15 +-
 11 files changed, 133 insertions(+), 115 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 19 11:50:42 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NiW3u-0001vC-9x
	for mharc-myserver-commit@gnu.org; Fri, 19 Feb 2010 11:50:42 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NiW3s-0001v6-6T
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 11:50:40 -0500
Received: from [140.186.70.92] (port=55081 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NiW3j-0001rY-0B
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 11:50:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiW3c-0008AL-1o
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 11:50:30 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:56166
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiW3b-0008AF-Rq
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 11:50:23 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NiW3b-0001mw-NB
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 16:50:23 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NiW3b-00070z-Br
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 16:50:23 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 542891e6822b2e087eab85bdeffca8cd38a10637
X-Git-Newrev: 43d4a89cb88d73ccfab8ee3d0b2bd420d623e25e
Message-Id: <E1NiW3b-00070z-Br@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 19 Feb 2010 16:50:23 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-16-g43d4a89
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Feb 2010 16:50:40 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  43d4a89cb88d73ccfab8ee3d0b2bd420d623e25e (commit)
       via  c52ee2ba2d56d639b1ae8df87dfda9fab8eb7547 (commit)
       via  fa456808694033adb00a4121ebfdc72beb052d20 (commit)
      from  542891e6822b2e087eab85bdeffca8cd38a10637 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 43d4a89cb88d73ccfab8ee3d0b2bd420d623e25e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 17:49:55 2010 +0100

    Join two lines in one.  The sentence is more readable now.

diff --git a/myserver/TODO b/myserver/TODO
index 97f828c..9bc238d 100644
--- a/myserver/TODO
+++ b/myserver/TODO
@@ -1,11 +1,9 @@
 GNU MyServer
 
 This file is not used anymore.  The tasks are handled dynamically
-trough the:
+trough the webpage:
 
 https://savannah.gnu.org/task/?group=myserver 
 
-web page.
-
 Please consider to ask on the bug-myserver@gnu.org mailing list before
 start to work on any task listed there.



commit c52ee2ba2d56d639b1ae8df87dfda9fab8eb7547
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 17:48:43 2010 +0100

    Add inline copyright header to documentation files.

diff --git a/myserver/documentation/basic_configuration.texi b/myserver/documentation/basic_configuration.texi
index 7bbd236..9d4cfbc 100644
--- a/myserver/documentation/basic_configuration.texi
+++ b/myserver/documentation/basic_configuration.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 @section Configuration files
 The MyServer configuration is done using three different XML files:
 
diff --git a/myserver/documentation/directory_listing.texi b/myserver/documentation/directory_listing.texi
index de09614..1baa87a 100644
--- a/myserver/documentation/directory_listing.texi
+++ b/myserver/documentation/directory_listing.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 @section Directory Listing
 When a resource mapped to a local directory is requested, MyServer
diff --git a/myserver/documentation/doclicense.texi b/myserver/documentation/doclicense.texi
index 8805f1a..137951c 100644
--- a/myserver/documentation/doclicense.texi
+++ b/myserver/documentation/doclicense.texi
@@ -1,3 +1,20 @@
+@c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 @c The GNU Free Documentation License.
 @center Version 1.3, 3 November 2008
 
diff --git a/myserver/documentation/error_pages.texi b/myserver/documentation/error_pages.texi
index a054b6a..163c2d6 100644
--- a/myserver/documentation/error_pages.texi
+++ b/myserver/documentation/error_pages.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 @section Error pages
 It is possible to specify a page when a HTTP error happens using the
diff --git a/myserver/documentation/log_management.texi b/myserver/documentation/log_management.texi
index cc34ce5..e6eddaf 100644
--- a/myserver/documentation/log_management.texi
+++ b/myserver/documentation/log_management.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 @section Overview of the log management features
 The MyServer's log management system was designed to support logging
diff --git a/myserver/documentation/mime_types.texi b/myserver/documentation/mime_types.texi
index 7208e59..26b18c1 100644
--- a/myserver/documentation/mime_types.texi
+++ b/myserver/documentation/mime_types.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 MIME types are used to specify the type of information a resource
 transmitted to or from the server contains.
 Some standard MIME types are already defined in the
diff --git a/myserver/documentation/myserver.texi b/myserver/documentation/myserver.texi
index 846b5e3..24b3843 100644
--- a/myserver/documentation/myserver.texi
+++ b/myserver/documentation/myserver.texi
@@ -1,3 +1,20 @@
+@c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 \input texinfo
 @setfilename myserver
 
@@ -130,4 +147,3 @@ SCGI and FastCGI protocols.
 @include doclicense.texi
 
 @bye
-@c -*-texinfo-*-
diff --git a/myserver/documentation/process_security.texi b/myserver/documentation/process_security.texi
index b6aad2d..d6615a7 100644
--- a/myserver/documentation/process_security.texi
+++ b/myserver/documentation/process_security.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 Under POSIX it is possible to change the MyServer process user identifier
 and group identifier after it has bound the necessary ports (only the
 root user can bind ports < 1024).
diff --git a/myserver/documentation/security.texi b/myserver/documentation/security.texi
index 4246dc9..f9235f7 100644
--- a/myserver/documentation/security.texi
+++ b/myserver/documentation/security.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 It is possible to change almost any configuration for a single
 directory or a single resource trough the @file{.security.xml}.
 This file can be placed in any web directory and it will overwrite
diff --git a/myserver/documentation/ssl_certificates.texi b/myserver/documentation/ssl_certificates.texi
index 4b7ce11..3523959 100644
--- a/myserver/documentation/ssl_certificates.texi
+++ b/myserver/documentation/ssl_certificates.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 @section Brief notes on data encryption
 The data encryption is used to protect the data that is sent between
diff --git a/myserver/documentation/virtual_hosts.texi b/myserver/documentation/virtual_hosts.texi
index 33c8351..932d54f 100644
--- a/myserver/documentation/virtual_hosts.texi
+++ b/myserver/documentation/virtual_hosts.texi
@@ -1,4 +1,20 @@
 @c -*-texinfo-*-
+@c GNU MyServer
+@c
+@c Copyright (C) 2002-2010 Free Software Foundation, Inc.
+@c
+@c This program is free software; you can redistribute it and/or modify
+@c it under the terms of the GNU General Public License as published by
+@c the Free Software Foundation; either version 3 of the License, or
+@c (at your option) any later version.
+@c
+@c This program is distributed in the hope that it will be useful,
+@c but WITHOUT ANY WARRANTY; without even the implied warranty of
+@c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+@c GNU General Public License for more details.
+@c
+@c You should have received a copy of the GNU General Public License
+@c along with this program.  If not, see <http://www.gnu.org/licenses/>.
 Virtual hosts is a method to link more than a domain name to the same
 machine, even if they refer to the same network interface.  Virtual
 hosts are supported by the HTTP and HTTPS protocols.



commit fa456808694033adb00a4121ebfdc72beb052d20
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 19 17:25:43 2010 +0100

    Add inline copyright to Makefile.am files.

diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index 5a9bc84..c6bceb2 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 if BUILD_TESTS
 TESTS_DIR = tests
 endif
diff --git a/myserver/binaries/Makefile.am b/myserver/binaries/Makefile.am
index c4982b5..5955626 100644
--- a/myserver/binaries/Makefile.am
+++ b/myserver/binaries/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 SUBDIRS = logs system web certificates plugins
 
 EXTRA_DIST = myserver-daemon MIMEtypes.default.xml myserver.default.xml \
diff --git a/myserver/binaries/certificates/Makefile.am b/myserver/binaries/certificates/Makefile.am
index 52cbebc..87b3c40 100644
--- a/myserver/binaries/certificates/Makefile.am
+++ b/myserver/binaries/certificates/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 EXTRA_DIST = how_create_certificates.txt
 install :
 	$(INSTALL) -d '$(DESTDIR)$(prefix)/etc/myserver/certificates'
diff --git a/myserver/binaries/logs/Makefile.am b/myserver/binaries/logs/Makefile.am
index 59d9fef..6ad3f53 100644
--- a/myserver/binaries/logs/Makefile.am
+++ b/myserver/binaries/logs/Makefile.am
@@ -1,2 +1,18 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 install :
 	$(INSTALL) -d $(DESTDIR)$(prefix)/var/log/myserver
diff --git a/myserver/binaries/plugins/Makefile.am b/myserver/binaries/plugins/Makefile.am
index 1263948..8a42123 100644
--- a/myserver/binaries/plugins/Makefile.am
+++ b/myserver/binaries/plugins/Makefile.am
@@ -1 +1,17 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 all:
diff --git a/myserver/binaries/system/Makefile.am b/myserver/binaries/system/Makefile.am
index 16e6d65..c67acbd 100644
--- a/myserver/binaries/system/Makefile.am
+++ b/myserver/binaries/system/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 SUBDIRS = errors icons css
 myserverdatadir = $(datadir)/myserver/system
 
diff --git a/myserver/binaries/system/css/Makefile.am b/myserver/binaries/system/css/Makefile.am
index 445f96a..b985678 100644
--- a/myserver/binaries/system/css/Makefile.am
+++ b/myserver/binaries/system/css/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 myserverdatadir = $(datadir)/myserver/system/css
 
 dist_myserverdata_DATA = browsestyle.css
\ No newline at end of file
diff --git a/myserver/binaries/system/errors/Makefile.am b/myserver/binaries/system/errors/Makefile.am
index 190e1e3..30d1a46 100644
--- a/myserver/binaries/system/errors/Makefile.am
+++ b/myserver/binaries/system/errors/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 myserverdatadir = $(datadir)/myserver/system/errors
 
 dist_myserverdata_DATA = 300.html 301.html 302.html 303.html \
diff --git a/myserver/binaries/system/icons/Makefile.am b/myserver/binaries/system/icons/Makefile.am
index 3a7954d..0d6b481 100644
--- a/myserver/binaries/system/icons/Makefile.am
+++ b/myserver/binaries/system/icons/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 SUBDIRS = codes
 myserverdatadir = $(datadir)/myserver/system/icons
  
diff --git a/myserver/binaries/system/icons/codes/Makefile.am b/myserver/binaries/system/icons/codes/Makefile.am
index 84641c5..2d3c26d 100644
--- a/myserver/binaries/system/icons/codes/Makefile.am
+++ b/myserver/binaries/system/icons/codes/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 myserverdatadir = $(datadir)/myserver/system/icons/codes
 
 dist_myserverdata_DATA = 300myserver.png 301myserver.png 302myserver.png \
diff --git a/myserver/binaries/web/Makefile.am b/myserver/binaries/web/Makefile.am
index 2ed3505..cf1b3e0 100644
--- a/myserver/binaries/web/Makefile.am
+++ b/myserver/binaries/web/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 if BUILD_MSCGI
 CGI_SRC = cgi-src
 endif
diff --git a/myserver/binaries/web/cgi-bin/Makefile.am b/myserver/binaries/web/cgi-bin/Makefile.am
index bcacd85..52ba3e8 100644
--- a/myserver/binaries/web/cgi-bin/Makefile.am
+++ b/myserver/binaries/web/cgi-bin/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 myserverdatadir = $(prefix)/var/web/cgi-bin
 
 dist_myserverdata_DATA = default.html
diff --git a/myserver/binaries/web/cgi-src/Makefile.am b/myserver/binaries/web/cgi-src/Makefile.am
index 172d9bf..1075da7 100644
--- a/myserver/binaries/web/cgi-src/Makefile.am
+++ b/myserver/binaries/web/cgi-src/Makefile.am
@@ -1 +1,17 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 SUBDIRS = math_sum post 
diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index 58c5510..e72617d 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # Makefile for math_sum
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmath_sum.a
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index 3abeb5e..3c13919 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # Makefile for post
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libpost.a
diff --git a/myserver/configure.ac b/myserver/configure.ac
index 2373590..15fe002 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -3,6 +3,7 @@ dnl
 dnl GNU MyServer
 dnl
 dnl Copyright (C) 2002-2010 Free Software Foundation, Inc.
+dnl
 dnl This program is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation; either version 3 of the License, or
diff --git a/myserver/documentation/Makefile.am b/myserver/documentation/Makefile.am
index db378f0..9ea6347 100644
--- a/myserver/documentation/Makefile.am
+++ b/myserver/documentation/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 info_TEXINFOS=myserver.texi
 
 #any other .texi that is not myserver.texi
diff --git a/myserver/include/Makefile.am b/myserver/include/Makefile.am
index 7adb216..08f0fc5 100644
--- a/myserver/include/Makefile.am
+++ b/myserver/include/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 includeincludedir=$(includedir)/myserver/include/find_data
 includeinclude_HEADERS =
 SUBDIRS = base conf connection connections_scheduler filter http_handler log plugin protocol server
diff --git a/myserver/include/base/Makefile.am b/myserver/include/base/Makefile.am
index feea976..dfafe80 100644
--- a/myserver/include/base/Makefile.am
+++ b/myserver/include/base/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 baseincludedir=$(includedir)/myserver/include/base
 baseinclude_HEADERS = utility.h
 SUBDIRS = base64 bitvec crypt dynamic_lib file files_cache read_directory \
diff --git a/myserver/include/base/base64/Makefile.am b/myserver/include/base/base64/Makefile.am
index a29ab73..d944e98 100644
--- a/myserver/include/base/base64/Makefile.am
+++ b/myserver/include/base/base64/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 base64includedir=$(includedir)/myserver/include/base/base64
 base64include_HEADERS = mime_utils.h
 SUBDIRS =
diff --git a/myserver/include/base/bitvec/Makefile.am b/myserver/include/base/bitvec/Makefile.am
index f37e3ea..5812a7c 100644
--- a/myserver/include/base/bitvec/Makefile.am
+++ b/myserver/include/base/bitvec/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 bitvecincludedir=$(includedir)/myserver/include/base/bitvec
 bitvecinclude_HEADERS = bitvec.h
 SUBDIRS =
diff --git a/myserver/include/base/crypt/Makefile.am b/myserver/include/base/crypt/Makefile.am
index 145337b..2b411e4 100644
--- a/myserver/include/base/crypt/Makefile.am
+++ b/myserver/include/base/crypt/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 cryptincludedir=$(includedir)/myserver/include/base/crypt
 cryptinclude_HEADERS = crypt_algo.h crypt_algo_manager.h md5.h sha1.h
 SUBDIRS =
diff --git a/myserver/include/base/dynamic_lib/Makefile.am b/myserver/include/base/dynamic_lib/Makefile.am
index d1cafbd..6d64922 100644
--- a/myserver/include/base/dynamic_lib/Makefile.am
+++ b/myserver/include/base/dynamic_lib/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 dynamic_libincludedir=$(includedir)/myserver/include/base/dynamic_lib
 dynamic_libinclude_HEADERS = dynamiclib.h
 SUBDIRS =
diff --git a/myserver/include/base/file/Makefile.am b/myserver/include/base/file/Makefile.am
index 81e346a..ba770b2 100644
--- a/myserver/include/base/file/Makefile.am
+++ b/myserver/include/base/file/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 fileincludedir=$(includedir)/myserver/include/base/file
 fileinclude_HEADERS = file.h files_utility.h
 SUBDIRS =
diff --git a/myserver/include/base/files_cache/Makefile.am b/myserver/include/base/files_cache/Makefile.am
index 9b53545..9503f3b 100644
--- a/myserver/include/base/files_cache/Makefile.am
+++ b/myserver/include/base/files_cache/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 files_cacheincludedir=$(includedir)/myserver/include/base/files_cache
 files_cacheinclude_HEADERS = cached_file_buffer.h cached_file_factory.h \
 			     cached_file.h membuf_file.h
diff --git a/myserver/include/base/hash_map/Makefile.am b/myserver/include/base/hash_map/Makefile.am
index 40ba6eb..7d37950 100644
--- a/myserver/include/base/hash_map/Makefile.am
+++ b/myserver/include/base/hash_map/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 hash_mapincludedir=$(includedir)/myserver/include/base/hash_map
 hash_mapinclude_HEADERS = hash_map.h
 SUBDIRS =
diff --git a/myserver/include/base/home_dir/Makefile.am b/myserver/include/base/home_dir/Makefile.am
index 1568bce..21f15c4 100644
--- a/myserver/include/base/home_dir/Makefile.am
+++ b/myserver/include/base/home_dir/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 home_dirincludedir=$(includedir)/myserver/include/base/home_dir
 home_dirinclude_HEADERS = home_dir.h
 SUBDIRS =
diff --git a/myserver/include/base/mem_buff/Makefile.am b/myserver/include/base/mem_buff/Makefile.am
index 4ff6ff2..231dea1 100644
--- a/myserver/include/base/mem_buff/Makefile.am
+++ b/myserver/include/base/mem_buff/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 mem_buffincludedir=$(includedir)/myserver/include/base/mem_buff
 mem_buffinclude_HEADERS = mem_buff.h
 SUBDIRS =
diff --git a/myserver/include/base/multicast/Makefile.am b/myserver/include/base/multicast/Makefile.am
index 304c66e..0d26afd 100644
--- a/myserver/include/base/multicast/Makefile.am
+++ b/myserver/include/base/multicast/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 multicastincludedir=$(includedir)/myserver/include/base/multicast
 multicastinclude_HEADERS = multicast.h
 SUBDIRS =
diff --git a/myserver/include/base/pipe/Makefile.am b/myserver/include/base/pipe/Makefile.am
index 88273c1..be8863e 100644
--- a/myserver/include/base/pipe/Makefile.am
+++ b/myserver/include/base/pipe/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 pipeincludedir=$(includedir)/myserver/include/base/pipe
 pipeinclude_HEADERS = pipe.h
 SUBDIRS =
diff --git a/myserver/include/base/process/Makefile.am b/myserver/include/base/process/Makefile.am
index dcfc9a6..e08800c 100644
--- a/myserver/include/base/process/Makefile.am
+++ b/myserver/include/base/process/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 processincludedir=$(includedir)/myserver/include/base/process
 processinclude_HEADERS = fork_server.h process.h process_server_manager.h
 SUBDIRS =
diff --git a/myserver/include/base/read_directory/Makefile.am b/myserver/include/base/read_directory/Makefile.am
index c1e726f..417e144 100644
--- a/myserver/include/base/read_directory/Makefile.am
+++ b/myserver/include/base/read_directory/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 read_directoryincludedir=$(includedir)/myserver/include/base/read_directory
 read_directoryinclude_HEADERS = read_directory.h
 SUBDIRS =
diff --git a/myserver/include/base/regex/Makefile.am b/myserver/include/base/regex/Makefile.am
index d73950c..9ec743a 100644
--- a/myserver/include/base/regex/Makefile.am
+++ b/myserver/include/base/regex/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 regexincludedir=$(includedir)/myserver/include/base/regex
 regexinclude_HEADERS = myserver_regex.h
 SUBDIRS =
diff --git a/myserver/include/base/safetime/Makefile.am b/myserver/include/base/safetime/Makefile.am
index 31ab21b..cb5801e 100644
--- a/myserver/include/base/safetime/Makefile.am
+++ b/myserver/include/base/safetime/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 safetimeincludedir=$(includedir)/myserver/include/base/safetime
 safetimeinclude_HEADERS = safetime.h
 SUBDIRS =
diff --git a/myserver/include/base/slab/Makefile.am b/myserver/include/base/slab/Makefile.am
index 84452c8..d359cdc 100644
--- a/myserver/include/base/slab/Makefile.am
+++ b/myserver/include/base/slab/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 slabincludedir=$(includedir)/myserver/include/base/slab
 slabinclude_HEADERS = slab.h
 SUBDIRS =
diff --git a/myserver/include/base/socket/Makefile.am b/myserver/include/base/socket/Makefile.am
index 38463c8..19867b8 100644
--- a/myserver/include/base/socket/Makefile.am
+++ b/myserver/include/base/socket/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 socketincludedir=$(includedir)/myserver/include/base/socket
 socketinclude_HEADERS = socket.h ssl_socket.h
 SUBDIRS =
diff --git a/myserver/include/base/socket_pair/Makefile.am b/myserver/include/base/socket_pair/Makefile.am
index 51f6b09..e17132a 100644
--- a/myserver/include/base/socket_pair/Makefile.am
+++ b/myserver/include/base/socket_pair/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 socket_pair_includedir=$(includedir)/myserver/include/base/socket_pair
 socket_pair_include_HEADERS = socket_pair.h
 SUBDIRS =
diff --git a/myserver/include/base/ssl/Makefile.am b/myserver/include/base/ssl/Makefile.am
index a758be2..48b4e09 100644
--- a/myserver/include/base/ssl/Makefile.am
+++ b/myserver/include/base/ssl/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 sslincludedir=$(includedir)/myserver/include/base/ssl
 sslinclude_HEADERS = ssl.h
 SUBDIRS =
diff --git a/myserver/include/base/string/Makefile.am b/myserver/include/base/string/Makefile.am
index 5fcf82d..34db319 100644
--- a/myserver/include/base/string/Makefile.am
+++ b/myserver/include/base/string/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 stringincludedir=$(includedir)/myserver/include/base/string
 stringinclude_HEADERS = securestr.h stringutils.h
 SUBDIRS =
diff --git a/myserver/include/base/sync/Makefile.am b/myserver/include/base/sync/Makefile.am
index 2ffaf7e..50a3b09 100644
--- a/myserver/include/base/sync/Makefile.am
+++ b/myserver/include/base/sync/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 syncincludedir=$(includedir)/myserver/include/base/sync
 syncinclude_HEADERS = event.h mutex.h read_write_lock.h recursive_mutex.h semaphore.h
 SUBDIRS =
diff --git a/myserver/include/base/thread/Makefile.am b/myserver/include/base/thread/Makefile.am
index 9fe2434..cfc5b82 100644
--- a/myserver/include/base/thread/Makefile.am
+++ b/myserver/include/base/thread/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 threadincludedir=$(includedir)/myserver/include/base/thread
 threadinclude_HEADERS = thread.h
 SUBDIRS =
diff --git a/myserver/include/base/unix_socket/Makefile.am b/myserver/include/base/unix_socket/Makefile.am
index 1fcc079..28bae49 100644
--- a/myserver/include/base/unix_socket/Makefile.am
+++ b/myserver/include/base/unix_socket/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 unix_socketincludedir=$(includedir)/myserver/include/base/unix_socket
 unix_socketinclude_HEADERS = unix_socket.h
 SUBDIRS =
diff --git a/myserver/include/base/xml/Makefile.am b/myserver/include/base/xml/Makefile.am
index 5b392f0..10b9688 100644
--- a/myserver/include/base/xml/Makefile.am
+++ b/myserver/include/base/xml/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 xmlincludedir=$(includedir)/myserver/include/base/xml
 xmlinclude_HEADERS = xml_parser.h
 SUBDIRS =
diff --git a/myserver/include/conf/Makefile.am b/myserver/include/conf/Makefile.am
index a51b361..9a5d6c3 100644
--- a/myserver/include/conf/Makefile.am
+++ b/myserver/include/conf/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 confincludedir=$(includedir)/myserver/include/conf
 confinclude_HEADERS = nodetree.h xml_conf.h
 SUBDIRS = main mime security vhost
diff --git a/myserver/include/conf/main/Makefile.am b/myserver/include/conf/main/Makefile.am
index 65dc283..875a6c1 100644
--- a/myserver/include/conf/main/Makefile.am
+++ b/myserver/include/conf/main/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 mainincludedir=$(includedir)/myserver/include/conf/main
 maininclude_HEADERS = main_configuration.h xml_main_configuration.h
 SUBDIRS =
diff --git a/myserver/include/conf/mime/Makefile.am b/myserver/include/conf/mime/Makefile.am
index 70ced8a..fe3785c 100644
--- a/myserver/include/conf/mime/Makefile.am
+++ b/myserver/include/conf/mime/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 mimeincludedir=$(includedir)/myserver/include/conf/mime
 mimeinclude_HEADERS = mime_manager.h xml_mime_handler.h
 SUBDIRS =
diff --git a/myserver/include/conf/security/Makefile.am b/myserver/include/conf/security/Makefile.am
index a79c6fc..6145adf 100644
--- a/myserver/include/conf/security/Makefile.am
+++ b/myserver/include/conf/security/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 securityincludedir=$(includedir)/myserver/include/conf/security
 securityinclude_HEADERS = auth_domain.h auth_method.h auth_method_factory.h security_cache.h security_domain.h security_manager.h security_token.h validator.h validator_factory.h xml_validator.h
 SUBDIRS =
diff --git a/myserver/include/conf/vhost/Makefile.am b/myserver/include/conf/vhost/Makefile.am
index 327a3ac..b33541e 100644
--- a/myserver/include/conf/vhost/Makefile.am
+++ b/myserver/include/conf/vhost/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 vhostincludedir=$(includedir)/myserver/include/conf/vhost
 vhostinclude_HEADERS = vhost.h vhost_manager.h ip.h xml_vhost_handler.h
 SUBDIRS =
diff --git a/myserver/include/connection/Makefile.am b/myserver/include/connection/Makefile.am
index 70790d3..0e48458 100644
--- a/myserver/include/connection/Makefile.am
+++ b/myserver/include/connection/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 connectionincludedir=$(includedir)/myserver/include/connection
 connectioninclude_HEADERS = connection.h
 SUBDIRS =
diff --git a/myserver/include/connections_scheduler/Makefile.am b/myserver/include/connections_scheduler/Makefile.am
index 33caa77..500506e 100644
--- a/myserver/include/connections_scheduler/Makefile.am
+++ b/myserver/include/connections_scheduler/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 connections_schedulerincludedir=$(includedir)/myserver/include/connections_scheduler
 connections_schedulerinclude_HEADERS = connections_scheduler.h listen_threads.h
 SUBDIRS =
diff --git a/myserver/include/filter/Makefile.am b/myserver/include/filter/Makefile.am
index f60a758..998fe83 100644
--- a/myserver/include/filter/Makefile.am
+++ b/myserver/include/filter/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 filterincludedir=$(includedir)/myserver/include/filter
 filterinclude_HEADERS = console.h filter.h filters_chain.h filters_factory.h memory_stream.h stream.h
 SUBDIRS = gzip
diff --git a/myserver/include/filter/gzip/Makefile.am b/myserver/include/filter/gzip/Makefile.am
index 9deb624..bbfffee 100644
--- a/myserver/include/filter/gzip/Makefile.am
+++ b/myserver/include/filter/gzip/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 gzipincludedir=$(includedir)/myserver/include/filter/gzip
 gzipinclude_HEADERS = gzip_decompress.h gzip.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/Makefile.am b/myserver/include/http_handler/Makefile.am
index 7b914e6..bdc72fe 100644
--- a/myserver/include/http_handler/Makefile.am
+++ b/myserver/include/http_handler/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 http_handlerincludedir=$(includedir)/myserver/include/http_handler
 http_handlerinclude_HEADERS =
 SUBDIRS = cgi fastcgi http_dir http_file isapi mscgi proxy scgi wincgi
diff --git a/myserver/include/http_handler/cgi/Makefile.am b/myserver/include/http_handler/cgi/Makefile.am
index b8582c7..c62e855 100644
--- a/myserver/include/http_handler/cgi/Makefile.am
+++ b/myserver/include/http_handler/cgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 cgiincludedir=$(includedir)/myserver/include/http_handler/cgi
 cgiinclude_HEADERS = cgi.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/fastcgi/Makefile.am b/myserver/include/http_handler/fastcgi/Makefile.am
index 7cf3e5c..9348b3b 100644
--- a/myserver/include/http_handler/fastcgi/Makefile.am
+++ b/myserver/include/http_handler/fastcgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 fastcgiincludedir=$(includedir)/myserver/include/http_handler/fastcgi
 fastcgiinclude_HEADERS = fastcgi.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/http_dir/Makefile.am b/myserver/include/http_handler/http_dir/Makefile.am
index c21fcf4..9ba9eb3 100644
--- a/myserver/include/http_handler/http_dir/Makefile.am
+++ b/myserver/include/http_handler/http_dir/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 http_dirincludedir=$(includedir)/myserver/include/http_handler/http_dir
 http_dirinclude_HEADERS = http_dir.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/http_file/Makefile.am b/myserver/include/http_handler/http_file/Makefile.am
index f68d4db..3428931 100644
--- a/myserver/include/http_handler/http_file/Makefile.am
+++ b/myserver/include/http_handler/http_file/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 http_fileincludedir=$(includedir)/myserver/include/http_handler/http_file
 http_fileinclude_HEADERS = http_file.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/isapi/Makefile.am b/myserver/include/http_handler/isapi/Makefile.am
index 307102b..88ef50e 100644
--- a/myserver/include/http_handler/isapi/Makefile.am
+++ b/myserver/include/http_handler/isapi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 isapiincludedir=$(includedir)/myserver/include/http_handler/isapi
 isapiinclude_HEADERS = isapi.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/mscgi/Makefile.am b/myserver/include/http_handler/mscgi/Makefile.am
index 41aea3b..47cbe11 100644
--- a/myserver/include/http_handler/mscgi/Makefile.am
+++ b/myserver/include/http_handler/mscgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 mscgiincludedir=$(includedir)/myserver/include/http_handler/mscgi
 mscgiinclude_HEADERS = mscgi.h mscgi_manager.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/proxy/Makefile.am b/myserver/include/http_handler/proxy/Makefile.am
index 9e5fc71..ce99393 100644
--- a/myserver/include/http_handler/proxy/Makefile.am
+++ b/myserver/include/http_handler/proxy/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 proxyincludedir=$(includedir)/myserver/include/http_handler/proxy
 proxyinclude_HEADERS = proxy.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/scgi/Makefile.am b/myserver/include/http_handler/scgi/Makefile.am
index 967ea83..cf232ba 100644
--- a/myserver/include/http_handler/scgi/Makefile.am
+++ b/myserver/include/http_handler/scgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 scgiincludedir=$(includedir)/myserver/include/http_handler/scgi
 scgiinclude_HEADERS = scgi.h
 SUBDIRS =
diff --git a/myserver/include/http_handler/wincgi/Makefile.am b/myserver/include/http_handler/wincgi/Makefile.am
index 994ef99..f5810be 100644
--- a/myserver/include/http_handler/wincgi/Makefile.am
+++ b/myserver/include/http_handler/wincgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 wincgiincludedir=$(includedir)/myserver/include/http_handler/wincgi
 wincgiinclude_HEADERS = wincgi.h
 SUBDIRS =
diff --git a/myserver/include/log/Makefile.am b/myserver/include/log/Makefile.am
index e55b1a4..5bdf3c9 100644
--- a/myserver/include/log/Makefile.am
+++ b/myserver/include/log/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 logincludedir=$(includedir)/myserver/include/log
 loginclude_HEADERS = log_manager.h
 SUBDIRS = stream
diff --git a/myserver/include/log/stream/Makefile.am b/myserver/include/log/stream/Makefile.am
index de07580..8b98150 100644
--- a/myserver/include/log/stream/Makefile.am
+++ b/myserver/include/log/stream/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 streamincludedir=$(includedir)/myserver/include/log/stream
 streaminclude_HEADERS = console_stream_creator.h console_stream.h file_stream_creator.h file_stream.h log_stream_creator.h log_stream_factory.h log_stream.h socket_stream_creator.h socket_stream.h
 SUBDIRS =
diff --git a/myserver/include/plugin/Makefile.am b/myserver/include/plugin/Makefile.am
index af1277b..74f2c1a 100644
--- a/myserver/include/plugin/Makefile.am
+++ b/myserver/include/plugin/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 pluginincludedir=$(includedir)/myserver/include/plugin
 plugininclude_HEADERS =  plugin.h plugin_info.h plugins_manager.h 
 
diff --git a/myserver/include/protocol/Makefile.am b/myserver/include/protocol/Makefile.am
index 60cb33f..6d7f3b4 100644
--- a/myserver/include/protocol/Makefile.am
+++ b/myserver/include/protocol/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 protocolincludedir=$(includedir)/myserver/include/protocol
 protocolinclude_HEADERS = protocol_buffer.h protocol.h protocols_manager.h url.h
 SUBDIRS = control ftp gopher http https
diff --git a/myserver/include/protocol/control/Makefile.am b/myserver/include/protocol/control/Makefile.am
index 213fbfc..55c6398 100644
--- a/myserver/include/protocol/control/Makefile.am
+++ b/myserver/include/protocol/control/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 controlincludedir=$(includedir)/myserver/include/protocol/control
 controlinclude_HEADERS = control_errors.h control_header.h control_protocol.h
 SUBDIRS =
diff --git a/myserver/include/protocol/ftp/Makefile.am b/myserver/include/protocol/ftp/Makefile.am
index 5316402..a964394 100644
--- a/myserver/include/protocol/ftp/Makefile.am
+++ b/myserver/include/protocol/ftp/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ftpincludedir=$(includedir)/myserver/include/protocol/ftp
 ftpinclude_HEADERS = ftp_common.h ftp.h ftp_lexer.h ftp_parser.h
 SUBDIRS =
diff --git a/myserver/include/protocol/gopher/Makefile.am b/myserver/include/protocol/gopher/Makefile.am
index 1995ecf..bc05d22 100644
--- a/myserver/include/protocol/gopher/Makefile.am
+++ b/myserver/include/protocol/gopher/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 gopherincludedir=$(includedir)/myserver/include/protocol/gopher
 gopherinclude_HEADERS = gopher.h gopher_content.h engine.h
 
diff --git a/myserver/include/protocol/http/Makefile.am b/myserver/include/protocol/http/Makefile.am
index e80d29d..18e4efb 100644
--- a/myserver/include/protocol/http/Makefile.am
+++ b/myserver/include/protocol/http/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 httpincludedir=$(includedir)/myserver/include/protocol/http
 httpinclude_HEADERS = dyn_http_command.h dyn_http_command_manager.h dyn_http_manager.h dyn_http_manager_list.h http_data_handler.h http_data_read.h http_errors.h http.h http_header.h http_headers.h http_request.h http_req_security_domain.h http_response.h http_thread_context.h
 SUBDIRS = env
diff --git a/myserver/include/protocol/http/env/Makefile.am b/myserver/include/protocol/http/env/Makefile.am
index edcfe55..4b277d6 100644
--- a/myserver/include/protocol/http/env/Makefile.am
+++ b/myserver/include/protocol/http/env/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 envincludedir=$(includedir)/myserver/include/protocol/http/env
 envinclude_HEADERS = env.h
 SUBDIRS =
diff --git a/myserver/include/protocol/https/Makefile.am b/myserver/include/protocol/https/Makefile.am
index f780bf9..eb4111e 100644
--- a/myserver/include/protocol/https/Makefile.am
+++ b/myserver/include/protocol/https/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 httpsincludedir=$(includedir)/myserver/include/protocol/https
 httpsinclude_HEADERS = https.h
 SUBDIRS =
diff --git a/myserver/include/server/Makefile.am b/myserver/include/server/Makefile.am
index 415645a..19cb42d 100644
--- a/myserver/include/server/Makefile.am
+++ b/myserver/include/server/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 serverincludedir=$(includedir)/myserver/include/server
 serverinclude_HEADERS = clients_thread.h server.h
 SUBDIRS =
diff --git a/myserver/lib/Makefile.am b/myserver/lib/Makefile.am
index 60c4d0d..33f45d3 100644
--- a/myserver/lib/Makefile.am
+++ b/myserver/lib/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ## Makefile for gnulib/lib				-*-Makefile-*-
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
diff --git a/myserver/po/Makefile.in.in b/myserver/po/Makefile.in.in
index fecf500..a781ea3 100644
--- a/myserver/po/Makefile.in.in
+++ b/myserver/po/Makefile.in.in
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # Makefile for PO directory in any package using GNU gettext.
 # Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 #
diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
index 663a419..2d2d187 100644
--- a/myserver/src/GUI/Makefile.am
+++ b/myserver/src/GUI/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 install:
 if BUILD_GUI
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/Makefile b/myserver/src/GUI/MyServer/pycontrollib/test/Makefile
index 7c7179e..65ff772 100644
--- a/myserver/src/GUI/MyServer/pycontrollib/test/Makefile
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/Makefile
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # MyServer
 # Copyright (C) 2009 Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index 808e836..65e64bd 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 SUBDIRS = base conf connection connections_scheduler filter http_handler \
 	log plugin protocol server GUI
diff --git a/myserver/src/base/Makefile.am b/myserver/src/base/Makefile.am
index aa185b4..020963d 100644
--- a/myserver/src/base/Makefile.am
+++ b/myserver/src/base/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libbase.a
 libbase_a_SOURCES = utility.cpp
diff --git a/myserver/src/base/base64/Makefile.am b/myserver/src/base/base64/Makefile.am
index 21f0c1b..e35a740 100644
--- a/myserver/src/base/base64/Makefile.am
+++ b/myserver/src/base/base64/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libbase64.a
 libbase64_a_SOURCES = mime_utils.cpp
diff --git a/myserver/src/base/bitvec/Makefile.am b/myserver/src/base/bitvec/Makefile.am
index f7c1ba1..309a415 100644
--- a/myserver/src/base/bitvec/Makefile.am
+++ b/myserver/src/base/bitvec/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libbitvec.a
 libbitvec_a_SOURCES = bitvec.cpp
diff --git a/myserver/src/base/crypt/Makefile.am b/myserver/src/base/crypt/Makefile.am
index a8e0740..7d78c5d 100644
--- a/myserver/src/base/crypt/Makefile.am
+++ b/myserver/src/base/crypt/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libcrypt.a
 libcrypt_a_SOURCES = crypt_algo.cpp crypt_algo_manager.cpp md5.cpp sha1.cpp
diff --git a/myserver/src/base/dynamic_lib/Makefile.am b/myserver/src/base/dynamic_lib/Makefile.am
index aa17621..749a97f 100644
--- a/myserver/src/base/dynamic_lib/Makefile.am
+++ b/myserver/src/base/dynamic_lib/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libdynamic_lib.a
 libdynamic_lib_a_SOURCES = dynamiclib.cpp
diff --git a/myserver/src/base/file/Makefile.am b/myserver/src/base/file/Makefile.am
index d521e7c..3e9bfe0 100644
--- a/myserver/src/base/file/Makefile.am
+++ b/myserver/src/base/file/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfile.a
 libfile_a_SOURCES = file.cpp files_utility.cpp
diff --git a/myserver/src/base/files_cache/Makefile.am b/myserver/src/base/files_cache/Makefile.am
index bee9f99..ec533a3 100644
--- a/myserver/src/base/files_cache/Makefile.am
+++ b/myserver/src/base/files_cache/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfiles_cache.a
 libfiles_cache_a_SOURCES = cached_file_buffer.cpp cached_file.cpp \
diff --git a/myserver/src/base/hash_map/Makefile.am b/myserver/src/base/hash_map/Makefile.am
index 76aaa13..302948f 100644
--- a/myserver/src/base/hash_map/Makefile.am
+++ b/myserver/src/base/hash_map/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhash_map.a
 libhash_map_a_SOURCES = hash_map.cpp
diff --git a/myserver/src/base/home_dir/Makefile.am b/myserver/src/base/home_dir/Makefile.am
index f4d1e67..d9bf9d3 100644
--- a/myserver/src/base/home_dir/Makefile.am
+++ b/myserver/src/base/home_dir/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhome_dir.a
 libhome_dir_a_SOURCES = home_dir.cpp
diff --git a/myserver/src/base/mem_buff/Makefile.am b/myserver/src/base/mem_buff/Makefile.am
index 8abba4e..2ca7db4 100644
--- a/myserver/src/base/mem_buff/Makefile.am
+++ b/myserver/src/base/mem_buff/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmem_buff.a
 libmem_buff_a_SOURCES = mem_buff.cpp
diff --git a/myserver/src/base/multicast/Makefile.am b/myserver/src/base/multicast/Makefile.am
index b6f8423..bdc0063 100644
--- a/myserver/src/base/multicast/Makefile.am
+++ b/myserver/src/base/multicast/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmulticast.a
 libmulticast_a_SOURCES = multicast.cpp
diff --git a/myserver/src/base/pipe/Makefile.am b/myserver/src/base/pipe/Makefile.am
index 4ce749a..747375e 100644
--- a/myserver/src/base/pipe/Makefile.am
+++ b/myserver/src/base/pipe/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libpipe.a
 libpipe_a_SOURCES = pipe.cpp
diff --git a/myserver/src/base/process/Makefile.am b/myserver/src/base/process/Makefile.am
index 2688602..e23aea3 100644
--- a/myserver/src/base/process/Makefile.am
+++ b/myserver/src/base/process/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libprocess.a
 libprocess_a_SOURCES = fork_server.cpp process.cpp process_server_manager.cpp
diff --git a/myserver/src/base/read_directory/Makefile.am b/myserver/src/base/read_directory/Makefile.am
index 4028f52..20af6ce 100644
--- a/myserver/src/base/read_directory/Makefile.am
+++ b/myserver/src/base/read_directory/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libread_directory.a
 libread_directory_a_SOURCES = read_directory.cpp
diff --git a/myserver/src/base/regex/Makefile.am b/myserver/src/base/regex/Makefile.am
index c7302e0..fcdf147 100644
--- a/myserver/src/base/regex/Makefile.am
+++ b/myserver/src/base/regex/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libregex.a
 libregex_a_SOURCES = myserver_regex.cpp
diff --git a/myserver/src/base/safetime/Makefile.am b/myserver/src/base/safetime/Makefile.am
index 9b5fe78..a683a64 100644
--- a/myserver/src/base/safetime/Makefile.am
+++ b/myserver/src/base/safetime/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsafetime.a
 libsafetime_a_SOURCES = safetime.cpp
diff --git a/myserver/src/base/slab/Makefile.am b/myserver/src/base/slab/Makefile.am
index 363cac2..0d4cf17 100644
--- a/myserver/src/base/slab/Makefile.am
+++ b/myserver/src/base/slab/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libslab.a
 libslab_a_SOURCES = slab.cpp
diff --git a/myserver/src/base/socket/Makefile.am b/myserver/src/base/socket/Makefile.am
index 7d8a25b..84d34b2 100644
--- a/myserver/src/base/socket/Makefile.am
+++ b/myserver/src/base/socket/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsocket.a
 libsocket_a_SOURCES = socket.cpp ssl_socket.cpp
diff --git a/myserver/src/base/socket_pair/Makefile.am b/myserver/src/base/socket_pair/Makefile.am
index 6a94351..f5d5e08 100644
--- a/myserver/src/base/socket_pair/Makefile.am
+++ b/myserver/src/base/socket_pair/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsocket_pair.a
 libsocket_pair_a_SOURCES = socket_pair.cpp
diff --git a/myserver/src/base/ssl/Makefile.am b/myserver/src/base/ssl/Makefile.am
index f8d5e80..c32fee2 100644
--- a/myserver/src/base/ssl/Makefile.am
+++ b/myserver/src/base/ssl/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libssl.a
 libssl_a_SOURCES = ssl.cpp
diff --git a/myserver/src/base/string/Makefile.am b/myserver/src/base/string/Makefile.am
index 430f267..1d1e32d 100644
--- a/myserver/src/base/string/Makefile.am
+++ b/myserver/src/base/string/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libstring.a
 libstring_a_SOURCES = securestr.cpp stringutils.cpp
diff --git a/myserver/src/base/sync/Makefile.am b/myserver/src/base/sync/Makefile.am
index bca19b0..7671a42 100644
--- a/myserver/src/base/sync/Makefile.am
+++ b/myserver/src/base/sync/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsync.a
 libsync_a_SOURCES = event.cpp mutex.cpp read_write_lock.cpp recursive_mutex.cpp semaphore.cpp
diff --git a/myserver/src/base/thread/Makefile.am b/myserver/src/base/thread/Makefile.am
index ee6fc19..41327ea 100644
--- a/myserver/src/base/thread/Makefile.am
+++ b/myserver/src/base/thread/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libthread.a
 libthread_a_SOURCES = thread.cpp
diff --git a/myserver/src/base/unix_socket/Makefile.am b/myserver/src/base/unix_socket/Makefile.am
index 2c6eef8..e9a76d6 100644
--- a/myserver/src/base/unix_socket/Makefile.am
+++ b/myserver/src/base/unix_socket/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libunix_socket.a
 libunix_socket_a_SOURCES = unix_socket.cpp
diff --git a/myserver/src/base/xml/Makefile.am b/myserver/src/base/xml/Makefile.am
index 0fae474..b493bb4 100644
--- a/myserver/src/base/xml/Makefile.am
+++ b/myserver/src/base/xml/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libxml.a
 libxml_a_SOURCES = xml_parser.cpp
diff --git a/myserver/src/conf/Makefile.am b/myserver/src/conf/Makefile.am
index 303ac44..aab0d35 100644
--- a/myserver/src/conf/Makefile.am
+++ b/myserver/src/conf/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libconf.a
 libconf_a_SOURCES = nodetree.cpp xml_conf.cpp
diff --git a/myserver/src/conf/main/Makefile.am b/myserver/src/conf/main/Makefile.am
index c0c5fd1..40eecef 100644
--- a/myserver/src/conf/main/Makefile.am
+++ b/myserver/src/conf/main/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmain.a
 libmain_a_SOURCES = main_configuration.cpp xml_main_configuration.cpp
diff --git a/myserver/src/conf/mime/Makefile.am b/myserver/src/conf/mime/Makefile.am
index 498b179..3eab217 100644
--- a/myserver/src/conf/mime/Makefile.am
+++ b/myserver/src/conf/mime/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmime.a
 libmime_a_SOURCES = mime_manager.cpp xml_mime_handler.cpp
diff --git a/myserver/src/conf/security/Makefile.am b/myserver/src/conf/security/Makefile.am
index ebe0bb8..2aa1bed 100644
--- a/myserver/src/conf/security/Makefile.am
+++ b/myserver/src/conf/security/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libsecurity.a
 libsecurity_a_SOURCES = auth_domain.cpp auth_method.cpp auth_method_factory.cpp security_cache.cpp security_domain.cpp security_manager.cpp security_token.cpp validator.cpp validator_factory.cpp xml_validator.cpp
diff --git a/myserver/src/conf/vhost/Makefile.am b/myserver/src/conf/vhost/Makefile.am
index 3074458..c1391e9 100644
--- a/myserver/src/conf/vhost/Makefile.am
+++ b/myserver/src/conf/vhost/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libvhost.a
 libvhost_a_SOURCES = vhost.cpp vhost_manager.cpp ip.cpp xml_vhost_handler.cpp
diff --git a/myserver/src/connection/Makefile.am b/myserver/src/connection/Makefile.am
index 25b1127..691012a 100644
--- a/myserver/src/connection/Makefile.am
+++ b/myserver/src/connection/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libconnection.a
 libconnection_a_SOURCES = connection.cpp
diff --git a/myserver/src/connections_scheduler/Makefile.am b/myserver/src/connections_scheduler/Makefile.am
index f6c7473..70474ec 100644
--- a/myserver/src/connections_scheduler/Makefile.am
+++ b/myserver/src/connections_scheduler/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libconnections_scheduler.a
 libconnections_scheduler_a_SOURCES = connections_scheduler.cpp listen_threads.cpp
diff --git a/myserver/src/filter/Makefile.am b/myserver/src/filter/Makefile.am
index 53084ff..e26fd93 100644
--- a/myserver/src/filter/Makefile.am
+++ b/myserver/src/filter/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfilter.a
 libfilter_a_SOURCES = filter.cpp filters_chain.cpp filters_factory.cpp memory_stream.cpp stream.cpp \
diff --git a/myserver/src/filter/gzip/Makefile.am b/myserver/src/filter/gzip/Makefile.am
index 895a22f..e4c1361 100644
--- a/myserver/src/filter/gzip/Makefile.am
+++ b/myserver/src/filter/gzip/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libgzip.a
 libgzip_a_SOURCES = gzip.cpp gzip_decompress.cpp
diff --git a/myserver/src/http_handler/Makefile.am b/myserver/src/http_handler/Makefile.am
index cf8edb3..188ebb4 100644
--- a/myserver/src/http_handler/Makefile.am
+++ b/myserver/src/http_handler/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp_handler.a
 libhttp_handler_a_SOURCES =
diff --git a/myserver/src/http_handler/cgi/Makefile.am b/myserver/src/http_handler/cgi/Makefile.am
index 2019ca1..b267203 100644
--- a/myserver/src/http_handler/cgi/Makefile.am
+++ b/myserver/src/http_handler/cgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libcgi.a
 libcgi_a_SOURCES = cgi.cpp
diff --git a/myserver/src/http_handler/fastcgi/Makefile.am b/myserver/src/http_handler/fastcgi/Makefile.am
index 0bf003e..003952d 100644
--- a/myserver/src/http_handler/fastcgi/Makefile.am
+++ b/myserver/src/http_handler/fastcgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libfastcgi.a
 libfastcgi_a_SOURCES = fastcgi.cpp
diff --git a/myserver/src/http_handler/http_dir/Makefile.am b/myserver/src/http_handler/http_dir/Makefile.am
index 086f3cf..cc30206 100644
--- a/myserver/src/http_handler/http_dir/Makefile.am
+++ b/myserver/src/http_handler/http_dir/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp_dir.a
 libhttp_dir_a_SOURCES = http_dir.cpp
diff --git a/myserver/src/http_handler/http_file/Makefile.am b/myserver/src/http_handler/http_file/Makefile.am
index 5cb96b8..e35b3b3 100644
--- a/myserver/src/http_handler/http_file/Makefile.am
+++ b/myserver/src/http_handler/http_file/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp_file.a
 libhttp_file_a_SOURCES = http_file.cpp
diff --git a/myserver/src/http_handler/isapi/Makefile.am b/myserver/src/http_handler/isapi/Makefile.am
index f53f45a..2e9ef67 100644
--- a/myserver/src/http_handler/isapi/Makefile.am
+++ b/myserver/src/http_handler/isapi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libisapi.a
 libisapi_a_SOURCES = isapi.cpp
diff --git a/myserver/src/http_handler/mscgi/Makefile.am b/myserver/src/http_handler/mscgi/Makefile.am
index e46cc0d..e83caab 100644
--- a/myserver/src/http_handler/mscgi/Makefile.am
+++ b/myserver/src/http_handler/mscgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libmscgi.a
 libmscgi_a_SOURCES = mscgi.cpp mscgi_manager.cpp
diff --git a/myserver/src/http_handler/proxy/Makefile.am b/myserver/src/http_handler/proxy/Makefile.am
index ce7d53a..6dbbda9 100644
--- a/myserver/src/http_handler/proxy/Makefile.am
+++ b/myserver/src/http_handler/proxy/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libproxy.a
 libproxy_a_SOURCES = proxy.cpp
diff --git a/myserver/src/http_handler/scgi/Makefile.am b/myserver/src/http_handler/scgi/Makefile.am
index a181789..e45cf8e 100644
--- a/myserver/src/http_handler/scgi/Makefile.am
+++ b/myserver/src/http_handler/scgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libscgi.a
 libscgi_a_SOURCES = scgi.cpp
diff --git a/myserver/src/http_handler/wincgi/Makefile.am b/myserver/src/http_handler/wincgi/Makefile.am
index 29c1cf0..0fa7b74 100644
--- a/myserver/src/http_handler/wincgi/Makefile.am
+++ b/myserver/src/http_handler/wincgi/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libwincgi.a
 libwincgi_a_SOURCES = wincgi.cpp
diff --git a/myserver/src/log/Makefile.am b/myserver/src/log/Makefile.am
index c3a2a97..dd3ca84 100644
--- a/myserver/src/log/Makefile.am
+++ b/myserver/src/log/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = liblog.a
 liblog_a_SOURCES = log_manager.cpp
diff --git a/myserver/src/log/stream/Makefile.am b/myserver/src/log/stream/Makefile.am
index bb04fc0..eb4e6c5 100644
--- a/myserver/src/log/stream/Makefile.am
+++ b/myserver/src/log/stream/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libstream.a
 libstream_a_SOURCES = console_stream.cpp file_stream.cpp \
diff --git a/myserver/src/plugin/Makefile.am b/myserver/src/plugin/Makefile.am
index aaa6194..385a36b 100644
--- a/myserver/src/plugin/Makefile.am
+++ b/myserver/src/plugin/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libplugin.a
 libplugin_a_SOURCES =  plugin.cpp plugin_info.cpp plugins_manager.cpp 
diff --git a/myserver/src/protocol/Makefile.am b/myserver/src/protocol/Makefile.am
index fa72e56..a7a30ae 100644
--- a/myserver/src/protocol/Makefile.am
+++ b/myserver/src/protocol/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libprotocol.a
 libprotocol_a_SOURCES = protocol_buffer.cpp protocol.cpp protocols_manager.cpp \
diff --git a/myserver/src/protocol/control/Makefile.am b/myserver/src/protocol/control/Makefile.am
index bd46a92..45aeb12 100644
--- a/myserver/src/protocol/control/Makefile.am
+++ b/myserver/src/protocol/control/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libcontrol.a
 libcontrol_a_SOURCES = control_header.cpp control_protocol.cpp
diff --git a/myserver/src/protocol/ftp/Makefile.am b/myserver/src/protocol/ftp/Makefile.am
index da742fa..135afd3 100644
--- a/myserver/src/protocol/ftp/Makefile.am
+++ b/myserver/src/protocol/ftp/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libftp.a
 libftp_a_SOURCES = ftp.cpp ftp_lexer.cpp ftp_parser.cpp
diff --git a/myserver/src/protocol/gopher/Makefile.am b/myserver/src/protocol/gopher/Makefile.am
index c3005a3..75cce42 100644
--- a/myserver/src/protocol/gopher/Makefile.am
+++ b/myserver/src/protocol/gopher/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libgopher.a
 libgopher_a_SOURCES = gopher.cpp gopher_content.cpp engine.cpp
diff --git a/myserver/src/protocol/http/Makefile.am b/myserver/src/protocol/http/Makefile.am
index f03cb3b..4a9ffbe 100644
--- a/myserver/src/protocol/http/Makefile.am
+++ b/myserver/src/protocol/http/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp.a
 libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp http_errors.cpp http_headers.cpp http_request.cpp http_req_security_domain.cpp http_response.cpp http_thread_context.cpp dyn_http_manager.cpp dyn_http_manager_list.cpp dyn_http_command.cpp dyn_http_command_manager.cpp
diff --git a/myserver/src/protocol/http/env/Makefile.am b/myserver/src/protocol/http/env/Makefile.am
index 09b052a..4d848d1 100644
--- a/myserver/src/protocol/http/env/Makefile.am
+++ b/myserver/src/protocol/http/env/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libenv.a
 libenv_a_SOURCES = env.cpp
diff --git a/myserver/src/protocol/https/Makefile.am b/myserver/src/protocol/https/Makefile.am
index 424f5c1..f5bd8e6 100644
--- a/myserver/src/protocol/https/Makefile.am
+++ b/myserver/src/protocol/https/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttps.a
 libhttps_a_SOURCES = https.cpp
diff --git a/myserver/src/server/Makefile.am b/myserver/src/server/Makefile.am
index 190c6e6..13fa4ae 100644
--- a/myserver/src/server/Makefile.am
+++ b/myserver/src/server/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libserver.a
 libserver_a_SOURCES = clients_thread.cpp server.cpp
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index d5bbf75..70c8af0 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -1,3 +1,19 @@
+# GNU MyServer
+#
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 bin_PROGRAMS = test_suite
 test_suite_SOURCES =  	main.cpp				\

-----------------------------------------------------------------------

Summary of changes:
 myserver/Makefile.am                               |   16 ++++++++++++++++
 myserver/TODO                                      |    4 +---
 myserver/binaries/Makefile.am                      |   16 ++++++++++++++++
 myserver/binaries/certificates/Makefile.am         |   16 ++++++++++++++++
 myserver/binaries/logs/Makefile.am                 |   16 ++++++++++++++++
 myserver/binaries/plugins/Makefile.am              |   16 ++++++++++++++++
 myserver/binaries/system/Makefile.am               |   16 ++++++++++++++++
 myserver/binaries/system/css/Makefile.am           |   16 ++++++++++++++++
 myserver/binaries/system/errors/Makefile.am        |   16 ++++++++++++++++
 myserver/binaries/system/icons/Makefile.am         |   16 ++++++++++++++++
 myserver/binaries/system/icons/codes/Makefile.am   |   16 ++++++++++++++++
 myserver/binaries/web/Makefile.am                  |   16 ++++++++++++++++
 myserver/binaries/web/cgi-bin/Makefile.am          |   16 ++++++++++++++++
 myserver/binaries/web/cgi-src/Makefile.am          |   16 ++++++++++++++++
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |   16 ++++++++++++++++
 myserver/binaries/web/cgi-src/post/Makefile.am     |   16 ++++++++++++++++
 myserver/configure.ac                              |    1 +
 myserver/documentation/Makefile.am                 |   16 ++++++++++++++++
 myserver/documentation/basic_configuration.texi    |   16 ++++++++++++++++
 myserver/documentation/directory_listing.texi      |   16 ++++++++++++++++
 myserver/documentation/doclicense.texi             |   17 +++++++++++++++++
 myserver/documentation/error_pages.texi            |   16 ++++++++++++++++
 myserver/documentation/log_management.texi         |   16 ++++++++++++++++
 myserver/documentation/mime_types.texi             |   16 ++++++++++++++++
 myserver/documentation/myserver.texi               |   18 +++++++++++++++++-
 myserver/documentation/process_security.texi       |   16 ++++++++++++++++
 myserver/documentation/security.texi               |   16 ++++++++++++++++
 myserver/documentation/ssl_certificates.texi       |   16 ++++++++++++++++
 myserver/documentation/virtual_hosts.texi          |   16 ++++++++++++++++
 myserver/include/Makefile.am                       |   16 ++++++++++++++++
 myserver/include/base/Makefile.am                  |   16 ++++++++++++++++
 myserver/include/base/base64/Makefile.am           |   16 ++++++++++++++++
 myserver/include/base/bitvec/Makefile.am           |   16 ++++++++++++++++
 myserver/include/base/crypt/Makefile.am            |   16 ++++++++++++++++
 myserver/include/base/dynamic_lib/Makefile.am      |   16 ++++++++++++++++
 myserver/include/base/file/Makefile.am             |   16 ++++++++++++++++
 myserver/include/base/files_cache/Makefile.am      |   16 ++++++++++++++++
 myserver/include/base/hash_map/Makefile.am         |   16 ++++++++++++++++
 myserver/include/base/home_dir/Makefile.am         |   16 ++++++++++++++++
 myserver/include/base/mem_buff/Makefile.am         |   16 ++++++++++++++++
 myserver/include/base/multicast/Makefile.am        |   16 ++++++++++++++++
 myserver/include/base/pipe/Makefile.am             |   16 ++++++++++++++++
 myserver/include/base/process/Makefile.am          |   16 ++++++++++++++++
 myserver/include/base/read_directory/Makefile.am   |   16 ++++++++++++++++
 myserver/include/base/regex/Makefile.am            |   16 ++++++++++++++++
 myserver/include/base/safetime/Makefile.am         |   16 ++++++++++++++++
 myserver/include/base/slab/Makefile.am             |   16 ++++++++++++++++
 myserver/include/base/socket/Makefile.am           |   16 ++++++++++++++++
 myserver/include/base/socket_pair/Makefile.am      |   16 ++++++++++++++++
 myserver/include/base/ssl/Makefile.am              |   16 ++++++++++++++++
 myserver/include/base/string/Makefile.am           |   16 ++++++++++++++++
 myserver/include/base/sync/Makefile.am             |   16 ++++++++++++++++
 myserver/include/base/thread/Makefile.am           |   16 ++++++++++++++++
 myserver/include/base/unix_socket/Makefile.am      |   16 ++++++++++++++++
 myserver/include/base/xml/Makefile.am              |   16 ++++++++++++++++
 myserver/include/conf/Makefile.am                  |   16 ++++++++++++++++
 myserver/include/conf/main/Makefile.am             |   16 ++++++++++++++++
 myserver/include/conf/mime/Makefile.am             |   16 ++++++++++++++++
 myserver/include/conf/security/Makefile.am         |   16 ++++++++++++++++
 myserver/include/conf/vhost/Makefile.am            |   16 ++++++++++++++++
 myserver/include/connection/Makefile.am            |   16 ++++++++++++++++
 myserver/include/connections_scheduler/Makefile.am |   16 ++++++++++++++++
 myserver/include/filter/Makefile.am                |   16 ++++++++++++++++
 myserver/include/filter/gzip/Makefile.am           |   16 ++++++++++++++++
 myserver/include/http_handler/Makefile.am          |   16 ++++++++++++++++
 myserver/include/http_handler/cgi/Makefile.am      |   16 ++++++++++++++++
 myserver/include/http_handler/fastcgi/Makefile.am  |   16 ++++++++++++++++
 myserver/include/http_handler/http_dir/Makefile.am |   16 ++++++++++++++++
 .../include/http_handler/http_file/Makefile.am     |   16 ++++++++++++++++
 myserver/include/http_handler/isapi/Makefile.am    |   16 ++++++++++++++++
 myserver/include/http_handler/mscgi/Makefile.am    |   16 ++++++++++++++++
 myserver/include/http_handler/proxy/Makefile.am    |   16 ++++++++++++++++
 myserver/include/http_handler/scgi/Makefile.am     |   16 ++++++++++++++++
 myserver/include/http_handler/wincgi/Makefile.am   |   16 ++++++++++++++++
 myserver/include/log/Makefile.am                   |   16 ++++++++++++++++
 myserver/include/log/stream/Makefile.am            |   16 ++++++++++++++++
 myserver/include/plugin/Makefile.am                |   16 ++++++++++++++++
 myserver/include/protocol/Makefile.am              |   16 ++++++++++++++++
 myserver/include/protocol/control/Makefile.am      |   16 ++++++++++++++++
 myserver/include/protocol/ftp/Makefile.am          |   16 ++++++++++++++++
 myserver/include/protocol/gopher/Makefile.am       |   16 ++++++++++++++++
 myserver/include/protocol/http/Makefile.am         |   16 ++++++++++++++++
 myserver/include/protocol/http/env/Makefile.am     |   16 ++++++++++++++++
 myserver/include/protocol/https/Makefile.am        |   16 ++++++++++++++++
 myserver/include/server/Makefile.am                |   16 ++++++++++++++++
 myserver/lib/Makefile.am                           |   16 ++++++++++++++++
 myserver/po/Makefile.in.in                         |   16 ++++++++++++++++
 myserver/src/GUI/Makefile.am                       |   16 ++++++++++++++++
 .../src/GUI/MyServer/pycontrollib/test/Makefile    |   16 ++++++++++++++++
 myserver/src/Makefile.am                           |   16 ++++++++++++++++
 myserver/src/base/Makefile.am                      |   16 ++++++++++++++++
 myserver/src/base/base64/Makefile.am               |   16 ++++++++++++++++
 myserver/src/base/bitvec/Makefile.am               |   16 ++++++++++++++++
 myserver/src/base/crypt/Makefile.am                |   16 ++++++++++++++++
 myserver/src/base/dynamic_lib/Makefile.am          |   16 ++++++++++++++++
 myserver/src/base/file/Makefile.am                 |   16 ++++++++++++++++
 myserver/src/base/files_cache/Makefile.am          |   16 ++++++++++++++++
 myserver/src/base/hash_map/Makefile.am             |   16 ++++++++++++++++
 myserver/src/base/home_dir/Makefile.am             |   16 ++++++++++++++++
 myserver/src/base/mem_buff/Makefile.am             |   16 ++++++++++++++++
 myserver/src/base/multicast/Makefile.am            |   16 ++++++++++++++++
 myserver/src/base/pipe/Makefile.am                 |   16 ++++++++++++++++
 myserver/src/base/process/Makefile.am              |   16 ++++++++++++++++
 myserver/src/base/read_directory/Makefile.am       |   16 ++++++++++++++++
 myserver/src/base/regex/Makefile.am                |   16 ++++++++++++++++
 myserver/src/base/safetime/Makefile.am             |   16 ++++++++++++++++
 myserver/src/base/slab/Makefile.am                 |   16 ++++++++++++++++
 myserver/src/base/socket/Makefile.am               |   16 ++++++++++++++++
 myserver/src/base/socket_pair/Makefile.am          |   16 ++++++++++++++++
 myserver/src/base/ssl/Makefile.am                  |   16 ++++++++++++++++
 myserver/src/base/string/Makefile.am               |   16 ++++++++++++++++
 myserver/src/base/sync/Makefile.am                 |   16 ++++++++++++++++
 myserver/src/base/thread/Makefile.am               |   16 ++++++++++++++++
 myserver/src/base/unix_socket/Makefile.am          |   16 ++++++++++++++++
 myserver/src/base/xml/Makefile.am                  |   16 ++++++++++++++++
 myserver/src/conf/Makefile.am                      |   16 ++++++++++++++++
 myserver/src/conf/main/Makefile.am                 |   16 ++++++++++++++++
 myserver/src/conf/mime/Makefile.am                 |   16 ++++++++++++++++
 myserver/src/conf/security/Makefile.am             |   16 ++++++++++++++++
 myserver/src/conf/vhost/Makefile.am                |   16 ++++++++++++++++
 myserver/src/connection/Makefile.am                |   16 ++++++++++++++++
 myserver/src/connections_scheduler/Makefile.am     |   16 ++++++++++++++++
 myserver/src/filter/Makefile.am                    |   16 ++++++++++++++++
 myserver/src/filter/gzip/Makefile.am               |   16 ++++++++++++++++
 myserver/src/http_handler/Makefile.am              |   16 ++++++++++++++++
 myserver/src/http_handler/cgi/Makefile.am          |   16 ++++++++++++++++
 myserver/src/http_handler/fastcgi/Makefile.am      |   16 ++++++++++++++++
 myserver/src/http_handler/http_dir/Makefile.am     |   16 ++++++++++++++++
 myserver/src/http_handler/http_file/Makefile.am    |   16 ++++++++++++++++
 myserver/src/http_handler/isapi/Makefile.am        |   16 ++++++++++++++++
 myserver/src/http_handler/mscgi/Makefile.am        |   16 ++++++++++++++++
 myserver/src/http_handler/proxy/Makefile.am        |   16 ++++++++++++++++
 myserver/src/http_handler/scgi/Makefile.am         |   16 ++++++++++++++++
 myserver/src/http_handler/wincgi/Makefile.am       |   16 ++++++++++++++++
 myserver/src/log/Makefile.am                       |   16 ++++++++++++++++
 myserver/src/log/stream/Makefile.am                |   16 ++++++++++++++++
 myserver/src/plugin/Makefile.am                    |   16 ++++++++++++++++
 myserver/src/protocol/Makefile.am                  |   16 ++++++++++++++++
 myserver/src/protocol/control/Makefile.am          |   16 ++++++++++++++++
 myserver/src/protocol/ftp/Makefile.am              |   16 ++++++++++++++++
 myserver/src/protocol/gopher/Makefile.am           |   16 ++++++++++++++++
 myserver/src/protocol/http/Makefile.am             |   16 ++++++++++++++++
 myserver/src/protocol/http/env/Makefile.am         |   16 ++++++++++++++++
 myserver/src/protocol/https/Makefile.am            |   16 ++++++++++++++++
 myserver/src/server/Makefile.am                    |   16 ++++++++++++++++
 myserver/tests/Makefile.am                         |   16 ++++++++++++++++
 146 files changed, 2308 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 19 19:05:16 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NicqS-00081Q-I5
	for mharc-myserver-commit@gnu.org; Fri, 19 Feb 2010 19:05:16 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NicqR-0007zE-7F
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 19:05:15 -0500
Received: from [140.186.70.92] (port=55176 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NicqP-0007vx-4L
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 19:05:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NicqN-0003yV-Gk
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 19:05:12 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:51716
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NicqN-0003yP-CJ
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 19:05:11 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NicqM-0006zZ-RI
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 00:05:11 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NicqM-0003Lv-DB
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 00:05:10 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 43d4a89cb88d73ccfab8ee3d0b2bd420d623e25e
X-Git-Newrev: f843f46e1b3a2b0e9dac1e36f477fc69b6c586c3
Message-Id: <E1NicqM-0003Lv-DB@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 20 Feb 2010 00:05:10 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-17-gf843f46
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Feb 2010 00:05:15 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  f843f46e1b3a2b0e9dac1e36f477fc69b6c586c3 (commit)
      from  43d4a89cb88d73ccfab8ee3d0b2bd420d623e25e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit f843f46e1b3a2b0e9dac1e36f477fc69b6c586c3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 20 01:03:26 2010 +0100

    Use the gnulib module strcasecmp.  Replace `strcmpi' with `strcasecmp'.

diff --git a/myserver/bootstrap.conf b/myserver/bootstrap.conf
index 02a2797..4150eae 100644
--- a/myserver/bootstrap.conf
+++ b/myserver/bootstrap.conf
@@ -56,6 +56,7 @@ setsockopt
 shutdown
 snprintf
 socket
+strcasecmp
 sysexits
 unlink
 write
diff --git a/myserver/include/base/string/stringutils.h b/myserver/include/base/string/stringutils.h
index 2f5b1b3..182be32 100644
--- a/myserver/include/base/string/stringutils.h
+++ b/myserver/include/base/string/stringutils.h
@@ -23,6 +23,11 @@
 # include "myserver.h"
 # include <string>
 
+extern "C"
+{
+# include <string.h>
+}
+
 using namespace std;
 
 const char *getRFC822GMTTime (char* out,int len);
@@ -50,7 +55,7 @@ const char* getGMTLogFormatDate (string& out, int len);
 time_t getTime (const char* str);
 inline time_t getTime (string const& str){ return getTime (str.c_str ()); }
 
-void trim (char* str, char* trimChars);
+void trim (char* str, char const* trimChars);
 
 void gotoNextLine (char** cmd);
 
@@ -80,12 +85,7 @@ int stringcmp (string const &a, const char* b);
 extern "C"
 {
   char* strupr (char * string);
-#  include <string.h>
 }
 # endif
 
-# ifndef strcmpi
-#  define strcmpi strcasecmp
-# endif
-
 #endif
diff --git a/myserver/src/base/string/stringutils.cpp b/myserver/src/base/string/stringutils.cpp
index 3d239e8..87ec4fa 100644
--- a/myserver/src/base/string/stringutils.cpp
+++ b/myserver/src/base/string/stringutils.cpp
@@ -591,10 +591,10 @@ string trim (string const &s,  string const &t)
  *attached to the head or tail of the string
  */
 
-void trim (char* str, char* trimchars)
+void trim (char* str, char const* trimchars)
 {
   char *strptr = str;
-  char *trimptr = trimchars;
+  const char *trimptr = trimchars;
 
   while (*trimptr && *strptr)
     {
@@ -826,7 +826,7 @@ int getEndLine (const char* str, int max)
  */
 int stringcmpi (string const &a, string const &b)
 {
-  return strcmpi (a.c_str (), b.c_str ());
+  return strcasecmp (a.c_str (), b.c_str ());
 }
 
 /*!
@@ -838,7 +838,7 @@ int stringcmpi (string const &a, string const &b)
  */
 int stringcmpi (string const &a, const char* b)
 {
-  return strcmpi (a.c_str (), b);
+  return strcasecmp (a.c_str (), b);
 }
 
 /*!
diff --git a/myserver/src/conf/security/auth_method.cpp b/myserver/src/conf/security/auth_method.cpp
index 01357ec..b78717c 100644
--- a/myserver/src/conf/security/auth_method.cpp
+++ b/myserver/src/conf/security/auth_method.cpp
@@ -47,7 +47,7 @@ bool AuthMethod::comparePassword (const char *password,
                                   const char *algorithm)
 {
   if (!algorithm)
-    return  strcmpi (password, savedPassword) == 0;
+    return  strcasecmp (password, savedPassword) == 0;
 
   if (cryptAlgoManager)
     {
diff --git a/myserver/src/filter/filters_chain.cpp b/myserver/src/filter/filters_chain.cpp
index 2476f91..f8ae4be 100644
--- a/myserver/src/filter/filters_chain.cpp
+++ b/myserver/src/filter/filters_chain.cpp
@@ -234,7 +234,7 @@ int FiltersChain::isFilterPresent (const char* name)
   list<Filter*>::iterator i = filters.begin ();
 
   for ( ; i != filters.end (); ++i )
-    if (!strcmpi ((*i)->getName (0, 0), name))
+    if (! strcasecmp ((*i)->getName (0, 0), name))
       return 1;
   return 0;
 }
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index f07e124..6a50412 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -735,7 +735,7 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
                                               &(con->td->nBytesToRead));
 
   bool allowSendfile =
-    !strcmpi (con->td->securityToken.getData ("fastcgi.sendfile.allow",
+    ! strcasecmp (con->td->securityToken.getData ("fastcgi.sendfile.allow",
                                               MYSERVER_VHOST_CONF
                                               | MYSERVER_SERVER_CONF, "NO"),
               "YES");
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index f8cce75..f75b0b1 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -425,7 +425,7 @@ int Scgi::buildScgiEnvironmentString (HttpThreadContext* td, char* src,
       if (max == 0)
         return -1;
 
-      if (!strcmpi (varName, "CONTENT_LENGTH") || !strcmpi (varName, "SCGI") ||
+      if (! strcasecmp (varName, "CONTENT_LENGTH") || ! strcasecmp (varName, "SCGI") ||
           !varNameLen || !varValueLen)
         continue;
 
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 4f58c70..da22a61 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -181,9 +181,9 @@ static error_t parseOpt (int key, char *arg, struct argp_state *state)
     case 'r':
       if (arg)
         {
-          if (!strcmpi (arg, "CONSOLE"))
+          if (! strcasecmp (arg, "CONSOLE"))
             in->runas = MYSERVER_RUNAS_CONSOLE;
-          else if (!strcmpi (arg, "SERVICE"))
+          else if (! strcasecmp (arg, "SERVICE"))
             in->runas = MYSERVER_RUNAS_SERVICE;
         }
       else
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 43144a3..7bd1736 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -110,7 +110,7 @@ int ControlProtocol::loadProtocol ()
   const char *data = 0;
 
   data = Server::getInstance ()->getData ("control.enabled");
-  if (data && (!strcmpi (data, "YES")))
+  if (data && (! strcasecmp (data, "YES")))
     controlEnabled = 1;
   else
     controlEnabled = 0;
@@ -125,12 +125,12 @@ int ControlProtocol::loadProtocol ()
 
   data = Server::getInstance ()->getData ("control.admin.md5");
   if (data)
-    if (strcmpi (data, "YES") == 0)
+    if (strcasecmp (data, "YES") == 0)
       adminNameMD5ized = 1;
 
   data = Server::getInstance ()->getData ("control.password.md5");
   if (data)
-    if (strcmpi (data, "YES") == 0)
+    if (strcasecmp (data, "YES") == 0)
       adminPasswordMD5ized = 1;
 
   if (adminNameMD5ized)
@@ -179,8 +179,8 @@ int ControlProtocol::checkAuth (ControlHeader& header)
   md5.update (headerPassword, (unsigned int)strlen (headerPassword));
   md5.end (authPasswordHeaderMD5);
 
-  if ((!strcmpi (adminLogin, authLoginHeaderMD5)) &&
-     (!strcmpi (adminPassword, authPasswordHeaderMD5)))
+  if ((! strcasecmp (adminLogin, authLoginHeaderMD5)) &&
+     (! strcasecmp (adminPassword, authPasswordHeaderMD5)))
     return 1;
   else
     return 0;
@@ -351,7 +351,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
       inFile->seek (0);
     }
 
-  if (strcmpi (version, "CONTROL/1.0"))
+  if (strcasecmp (version, "CONTROL/1.0"))
     {
       a->host->warningsLogWrite (_("Control: specified version not supported"));
       if (inFile)
@@ -506,7 +506,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
        * If the Keep-Alive was specified keep the connection in the
        * active connections list.
        */
-      if (!strcmpi (connection, "keep-alive"))
+      if (! strcasecmp (connection, "keep-alive"))
         return ClientsThread::KEEP_CONNECTION;
       else
         return ClientsThread::DELETE_CONNECTION;
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 1a62d86..10e72c9 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -376,23 +376,23 @@ int Ftp::loadProtocolstatic ()
 
   const char *pData = server->getData ("ftp.allow_anonymous");
   if (pData != NULL)
-    m_ballowAnonymous = strcmpi ("Yes", pData) == 0 ? true : false;
+    m_ballowAnonymous = strcasecmp ("Yes", pData) == 0 ? true : false;
 
   pData = server->getData ("ftp.anonymous_need_pass");
   if (pData != NULL)
-    m_bAnonymousNeedPass = strcmpi ("Yes", pData) == 0 ? true : false;
+    m_bAnonymousNeedPass = strcasecmp ("Yes", pData) == 0 ? true : false;
 
   pData = server->getData ("ftp.allow_asynchronous_cmds");
   if (pData != NULL)
-    m_ballowAsynchronousCmds = strcmpi ("Yes", pData) == 0 ? true : false;
+    m_ballowAsynchronousCmds = strcasecmp ("Yes", pData) == 0 ? true : false;
 
   pData = server->getData ("ftp.allow_pipelining");
   if (pData != NULL)
-    m_bEnablePipelining = strcmpi ("Yes", pData) == 0 ? true : false;
+    m_bEnablePipelining = strcasecmp ("Yes", pData) == 0 ? true : false;
 
   pData = server->getData ("ftp.allow_store");
   if (pData != NULL)
-    m_bEnablestoreCmds = strcmpi ("Yes", pData) == 0 ? true : false;
+    m_bEnablestoreCmds = strcasecmp ("Yes", pData) == 0 ? true : false;
 
   return 1;
 }
@@ -449,7 +449,7 @@ Ftp::user (const std::string & sParam)
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
   if (!m_ballowAnonymous
-      && strcmpi (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
+      && strcasecmp (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
     {
       ftpReply (530);
       return;
@@ -465,7 +465,7 @@ void Ftp::password (const std::string & sParam)
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
   if (!m_ballowAnonymous
-      && strcmpi (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
+      && strcasecmp (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
     {
       ftpReply (530);
       return;
@@ -573,7 +573,7 @@ void Ftp::retrstor (bool bretr, bool bappend, const std::string & sPath)
                                        MYSERVER_VHOST_CONF |
                                        MYSERVER_SERVER_CONF,
                                        ".security.xml");
-  if (!strcmpi (sLocalFileName.c_str (), secName))
+  if (! strcasecmp (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
       return;
@@ -1717,7 +1717,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
                                            ".security.xml");
       do
         {
-          if (fd.name[0] == '.' || !strcmpi (fd.name.c_str (), secName))
+          if (fd.name[0] == '.' || ! strcasecmp (fd.name.c_str (), secName))
             continue;
 
           perm[10] = '\0';
@@ -1934,7 +1934,7 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
                                        ".security.xml");
   do
     {
-      if (fd.name[0] == '.' || !strcmpi (fd.name.c_str (), secName))
+      if (fd.name[0] == '.' || ! strcasecmp (fd.name.c_str (), secName))
         continue;
 
       if (!sParam.empty ())
@@ -2217,7 +2217,7 @@ void Ftp::dele (const std::string & sPath)
                                        MYSERVER_VHOST_CONF |
                                        MYSERVER_SERVER_CONF,
                                        ".security.xml");
-  if (!strcmpi (sLocalFileName.c_str (), secName))
+  if (! strcasecmp (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
       closeDataConnection ();
@@ -2226,7 +2226,7 @@ void Ftp::dele (const std::string & sPath)
   FtpuserData *pFtpuserData =
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
-  if (strcmpi (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
+  if (strcasecmp (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
     {
       if (checkRights ("Guest", "", sLocalFileName, MYSERVER_PERMISSION_WRITE)
           == 0)
@@ -2348,7 +2348,7 @@ void Ftp::rnfr (const std::string & sPath)
                                        ".security.xml");
 
   /* The security file doesn't exist in any case.  */
-  if (!strcmpi (sLocalFileName.c_str (), secName))
+  if (! strcasecmp (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
       return;
@@ -2393,7 +2393,7 @@ void Ftp::Rnto (const std::string & sPath)
                                        ".security.xml");
 
   /* The security file doesn't exist in any case.  */
-  if (!strcmpi (sLocalFileName.c_str (), secName))
+  if (! strcasecmp (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
       return;
@@ -2418,7 +2418,7 @@ int Ftp::checkRights (const std::string & suser, const std::string & sPass,
 
   string user;
   string password;
-  if (strcmpi (suser.c_str (), "anonymous") == 0)
+  if (strcasecmp (suser.c_str (), "anonymous") == 0)
     {
       user.assign ("Guest");
       password.assign ("");
@@ -2469,7 +2469,7 @@ void Ftp::size (const std::string & sPath)
                                        MYSERVER_SERVER_CONF,
                                        ".security.xml");
 
-  if (!strcmpi (sLocalFileName.c_str (), secName))
+  if (! strcasecmp (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
       closeDataConnection ();
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 2b94ec3..ea1e4c6 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -101,7 +101,7 @@ int HttpProtocol::loadProtocol ()
   if (data)
     {
 
-      if (!strcmpi (data, "YES"))
+      if (! strcasecmp (data, "YES"))
         allowVhostMime = 1;
       else
         allowVhostMime = 0;
@@ -251,7 +251,7 @@ bool Http::allowMethod (const char *method)
                                                  MYSERVER_VHOST_CONF |
                                                  MYSERVER_SERVER_CONF, "YES");
 
-  return strcmpi (allow, "NO");
+  return strcasecmp (allow, "NO");
 }
 
 /*!
@@ -329,7 +329,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
           const char *perm = td->securityToken.getData ("symlinks.follow",
                               MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "NO");
 
-          if (!perm || strcmpi (perm, "YES"))
+          if (!perm || strcasecmp (perm, "YES"))
             return raiseHTTPError (401);
         }
 
@@ -390,7 +390,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
       *permissions = td->securityToken.getMask ();
 
       /* Check if we have to use digest for the current directory.  */
-      if (authType && !strcmpi (authType, "Digest"))
+      if (authType && ! strcasecmp (authType, "Digest"))
         {
           HttpUserData* hud = static_cast<HttpUserData*>
                                                (td->connection->protocolBuffer);
@@ -1076,7 +1076,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                     ("http.home_directory", MYSERVER_VHOST_CONF
                      | MYSERVER_SERVER_CONF, "public_html");
 
-                  if (strcmpi (useHomeDir, "YES"))
+                  if (strcasecmp (useHomeDir, "YES"))
                     return raiseHTTPError (404);
 
                   td->vhostDir.assign (documentRoot);
@@ -1359,7 +1359,7 @@ int Http::raiseHTTPError (int ID)
                                                               NULL);
       if (useMessagesVal)
         {
-          if (!strcmpi (useMessagesVal, "YES"))
+          if (! strcasecmp (useMessagesVal, "YES"))
             useMessagesFiles = 1;
           else
             useMessagesFiles = 0;
@@ -1444,7 +1444,7 @@ int Http::raiseHTTPError (int ID)
                                                              MYSERVER_VHOST_CONF |
                                                              MYSERVER_SERVER_CONF, NULL);
 
-        if (value && !strcmpi (value, "NO"))
+        if (value && ! strcasecmp (value, "NO"))
           {
             errorBodyLength = 0;
             td->response.contentLength.assign ("0");
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 9887741..9b228e9 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -548,14 +548,14 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           request->uri=trimRight (request->uri, " /");
           request->uriOpts=trim (request->uriOpts, " ");
         }
-      else if (!strcmpi (command, "Authorization"))
+      else if (! strcasecmp (command, "Authorization"))
         {
           int ret = readReqAuthLine (request, connection, token, &tokenOff);
           if (ret)
             return ret;
           lineControlled = 1;
         }
-      else if (!strcmpi (command, "Content-length"))
+      else if (! strcasecmp (command, "Content-length"))
         {
           tokenOff = getEndLine (token, HTTP_REQUEST_CONTENT_LENGTH_DIM);
           if (tokenOff == -1)
@@ -563,7 +563,7 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           lineControlled = 1;
           request->contentLength.assign (token,tokenOff);
         }
-      else if (!strcmpi (command, "Range"))
+      else if (! strcasecmp (command, "Range"))
         {
           int ret = readReqRangeLine (request, connection, token, &tokenOff);
           if (ret)
@@ -785,104 +785,104 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
         return 400;
       do
         {
-          trim (digestToken, (char*)" ");
-          if (!strcmpi (digestToken, (char*)"nonce"))
+          trim (digestToken, " ");
+          if (! strcasecmp (digestToken, "nonce"))
             {
-              digestToken = strtok (NULL, (char*)"," );
+              digestToken = strtok (NULL, "," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestNonce,digestToken,48 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"opaque"))
+          else if (! strcasecmp (digestToken, "opaque"))
             {
-              digestToken = strtok (NULL, (char*)"," );
+              digestToken = strtok (NULL, "," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestOpaque,digestToken,48 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"uri"))
+          else if (! strcasecmp (digestToken, "uri"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestUri,digestToken,1024 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"method"))
+          else if (! strcasecmp (digestToken, "method"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestMethod,digestToken,16 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"qop"))
+          else if (! strcasecmp (digestToken, "qop"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken,(char*)"\" ");
+                  trim (digestToken,"\" ");
                   myserver_strlcpy (request->digestQop,digestToken,16 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"realm"))
+          else if (! strcasecmp (digestToken, "realm"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestRealm,digestToken,48 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"cnonce"))
+          else if (! strcasecmp (digestToken, "cnonce"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)" \"");
+                  trim (digestToken, " \"");
                   myserver_strlcpy (request->digestCnonce, digestToken, 48 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"username"))
+          else if (! strcasecmp (digestToken, "username"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestUsername, digestToken, 48 + 1);
                   connection->setLogin (digestToken);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"response"))
+          else if (! strcasecmp (digestToken, "response"))
             {
               digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestResponse,digestToken,48 + 1);
                 }
             }
-          else if (!strcmpi (digestToken, (char*)"nc"))
+          else if (! strcasecmp (digestToken, "nc"))
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  trim (digestToken, (char*)"\" ");
+                  trim (digestToken, "\" ");
                   myserver_strlcpy (request->digestNc, digestToken, 10 + 1);
                 }
             }
           else
             {
-              digestToken = strtok (NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
             }
           /* Update digestToken.  */
-          digestToken = strtok (NULL, (char*)"=" );
+          digestToken = strtok (NULL, "=" );
         }while (digestToken);
       delete  [] digestBuff;
     }
@@ -1014,7 +1014,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct (const char *input,
         if (token)
           response->errorType.assign (token);
       }
-    else if (!strcmpi (command,"Status"))
+    else if (! strcasecmp (command,"Status"))
       {
         token = strtok (NULL, "\r\n\0" );
         lineControlled = 1;
@@ -1027,7 +1027,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct (const char *input,
           if (token)
             response->httpStatus = atoi (token);
       }
-    else if (!strcmpi (command, "Content-length"))
+    else if (! strcasecmp (command, "Content-length"))
       {
         token = strtok (NULL, "\r\n\0" );
         lineControlled = 1;
@@ -1060,7 +1060,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct (const char *input,
                 break;
               }
 
-            if (!strcmpi (command, "Content-type"))
+            if (! strcasecmp (command, "Content-type"))
               append = false;
 
             HttpResponseHeader::Entry *old = NULL;
diff --git a/myserver/src/protocol/http/http_request.cpp b/myserver/src/protocol/http/http_request.cpp
index 35391f6..4152e7c 100644
--- a/myserver/src/protocol/http/http_request.cpp
+++ b/myserver/src/protocol/http/http_request.cpp
@@ -98,56 +98,56 @@ bool HttpRequestHeader::isKeepAlive ()
  */
 string* HttpRequestHeader::getValue (const char* name, string* out)
 {
-  if (!strcmpi (name, "cmd"))
+  if (! strcasecmp (name, "cmd"))
   {
     if (out)
       out->assign (cmd.c_str ());
     return &cmd;
   }
 
-  if (!strcmpi (name, "ver"))
+  if (! strcasecmp (name, "ver"))
   {
     if (out)
       out->assign (ver.c_str ());
     return &ver;
   }
 
-  if (!strcmpi (name, "uri"))
+  if (! strcasecmp (name, "uri"))
   {
     if (out)
       out->assign (uri.c_str ());
     return &uri;
   }
 
-  if (!strcmpi (name, "uriOpts"))
+  if (! strcasecmp (name, "uriOpts"))
   {
     if (out)
       out->assign (uriOpts.c_str ());
     return &uriOpts;
   }
 
- if (!strcmpi (name, "Authorization"))
+ if (! strcasecmp (name, "Authorization"))
  {
    if (out)
      out->assign (auth.c_str ());
    return &auth;
  }
 
- if (!strcmpi (name, "Content-length"))
+ if (! strcasecmp (name, "Content-length"))
  {
    if (out)
      out->assign (contentLength.c_str ());
    return &contentLength;
  }
 
- if (!strcmpi (name, "rangeType"))
+ if (! strcasecmp (name, "rangeType"))
  {
    if (out)
      out->assign (rangeType.c_str ());
    return &rangeType;
  }
 
- if (!strcmpi (name, "rangeByteBegin"))
+ if (! strcasecmp (name, "rangeByteBegin"))
  {
    ostringstream s;
    s << rangeByteBegin;
@@ -156,7 +156,7 @@ string* HttpRequestHeader::getValue (const char* name, string* out)
    return 0;
  }
 
- if (!strcmpi (name, "rangeByteEnd"))
+ if (! strcasecmp (name, "rangeByteEnd"))
  {
    ostringstream s;
    s << rangeByteEnd;
@@ -185,55 +185,55 @@ string* HttpRequestHeader::getValue (const char* name, string* out)
  */
 string* HttpRequestHeader::setValue (const char* name, const char* in)
 {
-  if (!strcmpi (name, "cmd"))
+  if (! strcasecmp (name, "cmd"))
   {
     cmd.assign (in);
     return &cmd;
   }
 
-  if (!strcmpi (name, "ver"))
+  if (! strcasecmp (name, "ver"))
   {
     ver.assign (in);
     return &ver;
   }
 
-  if (!strcmpi (name, "uri"))
+  if (! strcasecmp (name, "uri"))
   {
     uri.assign (in);
     return &uri;
   }
 
-  if (!strcmpi (name, "uriOpts"))
+  if (! strcasecmp (name, "uriOpts"))
   {
     uriOpts.assign (in);
     return &uriOpts;
   }
 
- if (!strcmpi (name, "Authorization"))
+ if (! strcasecmp (name, "Authorization"))
  {
    auth.assign (in);
    return &auth;
  }
 
- if (!strcmpi (name, "Content-length"))
+ if (! strcasecmp (name, "Content-length"))
  {
    contentLength.assign (in);
    return &contentLength;
  }
 
- if (!strcmpi (name, "rangeType"))
+ if (! strcasecmp (name, "rangeType"))
  {
    rangeType.assign (in);
    return &rangeType;
  }
 
- if (!strcmpi (name, "rangeByteBegin"))
+ if (! strcasecmp (name, "rangeByteBegin"))
  {
    rangeByteBegin = atoi (in);
    return 0;
  }
 
- if (!strcmpi (name, "rangeByteEnd"))
+ if (! strcasecmp (name, "rangeByteEnd"))
  {
    rangeByteEnd = atoi (in);
    return 0;
diff --git a/myserver/src/protocol/http/http_response.cpp b/myserver/src/protocol/http/http_response.cpp
index a3fbb3d..79172be 100644
--- a/myserver/src/protocol/http/http_response.cpp
+++ b/myserver/src/protocol/http/http_response.cpp
@@ -63,14 +63,14 @@ void HttpResponseHeader::free ()
  */
 string* HttpResponseHeader::getValue (const char* name, string* out)
 {
-  if (!strcmpi (name, "Ver"))
+  if (! strcasecmp (name, "Ver"))
     {
       if (out)
         out->assign (ver.c_str ());
       return &ver;
     }
 
-  if (!strcmpi (name, "Content-length"))
+  if (! strcasecmp (name, "Content-length"))
     {
       if (out)
         out->assign (contentLength.c_str ());
@@ -92,13 +92,13 @@ string* HttpResponseHeader::getValue (const char* name, string* out)
  */
 string* HttpResponseHeader::setValue (const char* name, const char* in)
 {
-  if (!strcmpi (name, "Ver"))
+  if (! strcasecmp (name, "Ver"))
     {
       ver.assign (in);
       return &ver;
     }
 
-  if (!strcmpi (name, "Content-length"))
+  if (! strcasecmp (name, "Content-length"))
     {
       contentLength.assign (in);
       return &contentLength;
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index 4abd19a..b6ea1c9 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -57,7 +57,7 @@ void* test_unix_socket_server (void* pParam)
     }
 
 
-  server->result = !strcmpi (buffer, TEST_STRING);
+  server->result = ! strcasecmp (buffer, TEST_STRING);
 
   client.close ();
   return NULL;

-----------------------------------------------------------------------

Summary of changes:
 myserver/bootstrap.conf                            |    1 +
 myserver/include/base/string/stringutils.h         |   12 ++--
 myserver/src/base/string/stringutils.cpp           |    8 +-
 myserver/src/conf/security/auth_method.cpp         |    2 +-
 myserver/src/filter/filters_chain.cpp              |    2 +-
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |    2 +-
 myserver/src/http_handler/scgi/scgi.cpp            |    2 +-
 myserver/src/myserver.cpp                          |    4 +-
 myserver/src/protocol/control/control_protocol.cpp |   14 ++--
 myserver/src/protocol/ftp/ftp.cpp                  |   32 ++++----
 myserver/src/protocol/http/http.cpp                |   14 ++--
 myserver/src/protocol/http/http_headers.cpp        |   76 ++++++++++----------
 myserver/src/protocol/http/http_request.cpp        |   36 +++++-----
 myserver/src/protocol/http/http_response.cpp       |    8 +-
 myserver/tests/test_unix_socket.cpp                |    2 +-
 15 files changed, 108 insertions(+), 107 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 19 22:09:45 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nifiz-0007Ag-4z
	for mharc-myserver-commit@gnu.org; Fri, 19 Feb 2010 22:09:45 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nifix-00078q-6o
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 22:09:43 -0500
Received: from [140.186.70.92] (port=40607 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nifiw-00077R-6J
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 22:09:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nifiv-00034i-Cx
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 22:09:42 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:54480
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nifiv-00034d-9P
	for myserver-commit@gnu.org; Fri, 19 Feb 2010 22:09:41 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nifiv-0000fy-2J
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 03:09:41 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nifiu-0002Gl-Tw
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 03:09:41 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f843f46e1b3a2b0e9dac1e36f477fc69b6c586c3
X-Git-Newrev: 59bb686116a92c5120388c2c08c6289e67dd49f1
Message-Id: <E1Nifiu-0002Gl-Tw@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 20 Feb 2010 03:09:40 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-20-g59bb686
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Feb 2010 03:09:43 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  59bb686116a92c5120388c2c08c6289e67dd49f1 (commit)
       via  51b5113034f1a88647791ca87e354a6a4b9c6376 (commit)
       via  e3dc2e96b957c32f9caabb0e4a906513f131b3f0 (commit)
      from  f843f46e1b3a2b0e9dac1e36f477fc69b6c586c3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 59bb686116a92c5120388c2c08c6289e67dd49f1
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 20 04:08:18 2010 +0100

    File::openFile ensures the descriptor is close on exceptions.

diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 0f5c0b8..d0c4eca 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -166,19 +166,29 @@ int File::openFile (const char* nfilename, u_long opt)
   else
     handle = open (filename.c_str (), O_CREAT | flags, S_IRUSR | S_IWUSR);
 
-  if (opt & File::FILE_CREATE_ALWAYS)
-    if (truncate ())
-      {
-        close ();
-        return -1;
-      }
+  try
+    {
+      if (opt & File::FILE_CREATE_ALWAYS)
+        if (truncate ())
+          {
+            close ();
+            return -1;
+          }
  
-  if (opt & File::TEMPORARY)
-    if (unlink (filename.c_str ()))
-      {
-        close ();
-        return -1;
-      }
+      if (opt & File::TEMPORARY)
+        if (unlink (filename.c_str ()))
+          {
+            close ();
+            return -1;
+          }
+    }
+  catch (exception &e)
+    {
+      /* Ensure the file is closed if something went wrong and don't leave
+         open descriptors around.  */
+      close ();
+      throw;
+    }
 
   this->opt = opt;
   return handle < 0;



commit 51b5113034f1a88647791ca87e354a6a4b9c6376
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 20 04:02:50 2010 +0100

    Change the type of the local variable `i' and avoid casts.

diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 9b228e9..8956b8c 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -570,7 +570,7 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
             return ret;
           lineControlled = 1;
         }
-      else if (!lineControlled)
+      else if (! lineControlled)
         {
           tokenOff = getEndLine (token, maxTotchars);
           if (tokenOff==-1)
@@ -621,7 +621,7 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
   char rangeByteBegin[13];
   char rangeByteEnd[13];
   const char *localToken = token;
-  int i = 0;
+  size_t i = 0;
   rangeByteBegin[0] = '\0';
   rangeByteEnd[0] = '\0';
 
@@ -656,22 +656,22 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
       rangeByteEnd[i++] = *localToken;
       rangeByteEnd[i] = '\0';
     }
-  while ((*(++localToken) != '\r' )&&(i<12));
+  while ((*(++localToken) != '\r') && (i < 12));
 
-  for (i = 0; i < static_cast<int>(request->rangeType.length ()); i++)
+  for (i = 0; i < request->rangeType.length (); i++)
     if (request->rangeType[i] == '=')
       request->rangeType[i] = '\0';
 
-  for (i = 0; i < static_cast<int>(strlen (rangeByteBegin)); i++)
+  for (i = 0; i < strlen (rangeByteBegin); i++)
     if (rangeByteBegin[i] == '=')
       rangeByteBegin[i] = '\0';
 
-  for (i = 0; i < static_cast<int>(strlen (rangeByteEnd)); i++)
-    if (rangeByteEnd[i]== '=')
-      rangeByteEnd[i]='\0';
+  for (i = 0; i < strlen (rangeByteEnd); i++)
+    if (rangeByteEnd[i] == '=')
+      rangeByteEnd[i] = '\0';
 
   if (rangeByteBegin[0] == 0)
-    request->rangeByteBegin=0;
+    request->rangeByteBegin = 0;
   else
     request->rangeByteBegin = (u_long) atol (rangeByteBegin);
 
@@ -696,8 +696,7 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
  * \return 0 on success, any other value is the HTTP error.
  */
 int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
-                                  Connection *connection,
-                                  const char *token,
+                                  Connection *connection, const char *token,
                                   int *lenOut)
 {
   const char *origToken = token;
@@ -713,7 +712,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
   connection->setLogin ("");
   connection->setPassword ("");
 
-  if (!request->auth.compare ("Basic"))
+  if (! request->auth.compare ("Basic"))
     {
       u_long i;
       const char *base64 = &token[6];
@@ -759,7 +758,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
         return 400;
       *lenOut += token - origToken;
     }
-  else if (!request->auth.compare ("Digest"))
+  else if (! request->auth.compare ("Digest"))
     {
       char *digestBuff;
       char *digestToken;
@@ -775,13 +774,13 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
 
 
       digestBuff = new char[tokenOff + 1];
-      if (!digestBuff)
+      if (! digestBuff)
         return 500;
 
       memcpy (digestBuff, token, tokenOff);
       digestBuff[tokenOff] = '\0';
       digestToken = strtok (digestBuff, "=" );
-      if (!digestToken)
+      if (! digestToken)
         return 400;
       do
         {
@@ -961,7 +960,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct (const char *input,
   if (validResponse)
   {
     newInput = new char[maxTotchars + 1];
-    if (!newInput)
+    if (! newInput)
       return 0;
     /*
      * FIXME:



commit e3dc2e96b957c32f9caabb0e4a906513f131b3f0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 20 03:54:34 2010 +0100

    HttpRequestHeader::isKeepAlive avoids a string copy.  Add a test.

diff --git a/myserver/src/protocol/http/http_request.cpp b/myserver/src/protocol/http/http_request.cpp
index 4152e7c..2cbfeea 100644
--- a/myserver/src/protocol/http/http_request.cpp
+++ b/myserver/src/protocol/http/http_request.cpp
@@ -85,11 +85,9 @@ bool HttpRequestHeader::isKeepAlive ()
 {
     Entry *connection = other.get ("Connection");
     if (connection)
-    {
-      string value (*connection->value);
-      std::transform (value.begin (), value.end (), value.begin (), (int (*)(int)) tolower);
-      return value.find ("keep-alive") != string::npos;
-    }
+      return (! stringcmpi (*connection->value,
+                            "keep-alive"));
+
     return false;
 }
 
diff --git a/myserver/tests/test_http_request.cpp b/myserver/tests/test_http_request.cpp
index 376197b..c2dc13e 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.cpp
@@ -42,6 +42,7 @@ class TestHttpRequest : public CppUnit::TestFixture
   CPPUNIT_TEST (testIncompleteHeader);
   CPPUNIT_TEST (testDefaultHttpRequest);
   CPPUNIT_TEST (testValidRequest);
+  CPPUNIT_TEST (testKeepAlive);
   CPPUNIT_TEST (testResetHttpRequest);
   CPPUNIT_TEST_SUITE_END ();
 
@@ -56,6 +57,50 @@ public:
 
   }
 
+
+  void testKeepAlive ()
+  {
+    HttpRequestHeader header;
+    Connection connection;
+    u_long requestLength;
+    const char * requestStr;
+    int ret;
+#define BUILD_KEEPALIVE_REQ(X) "GET / HTTP/1.1\r\n" \
+      "Connection: " X "\r\n"                       \
+      "Host: localhost\r\n\r\n"
+
+    requestStr = BUILD_KEEPALIVE_REQ ("Keep-Alive");
+    ret = HttpHeaders::buildHTTPRequestHeaderStruct (requestStr,
+                                                     strlen (requestStr),
+                                                     &requestLength,
+                                                     &header,
+                                                     &connection);
+
+    CPPUNIT_ASSERT (header.isKeepAlive ());
+
+    requestStr = BUILD_KEEPALIVE_REQ ("close");
+    HttpHeaders::resetHTTPRequest (&header);
+    ret = HttpHeaders::buildHTTPRequestHeaderStruct (requestStr,
+                                                     strlen (requestStr),
+                                                     &requestLength,
+                                                     &header,
+                                                     &connection);
+
+    CPPUNIT_ASSERT (! header.isKeepAlive ());
+
+    requestStr = BUILD_KEEPALIVE_REQ ("keep-Alive");
+    HttpHeaders::resetHTTPRequest (&header);
+    ret = HttpHeaders::buildHTTPRequestHeaderStruct (requestStr,
+                                                     strlen (requestStr),
+                                                     &requestLength,
+                                                     &header,
+                                                     &connection);
+
+    CPPUNIT_ASSERT (header.isKeepAlive ());
+
+#undef BUILD_KEEPALIVE_REQ
+  }
+
   void testSimpleHeader ()
   {
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/base/file/file.cpp             |   34 +++++++++++++-------
 myserver/src/protocol/http/http_headers.cpp |   31 +++++++++---------
 myserver/src/protocol/http/http_request.cpp |    8 ++---
 myserver/tests/test_http_request.cpp        |   45 +++++++++++++++++++++++++++
 4 files changed, 85 insertions(+), 33 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Feb 20 17:33:27 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nixt8-0002Ie-Tj
	for mharc-myserver-commit@gnu.org; Sat, 20 Feb 2010 17:33:26 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nixt7-0002Ei-60
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 17:33:25 -0500
Received: from [140.186.70.92] (port=33710 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nixt4-0002AV-3M
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 17:33:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nixt3-0007cE-JE
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 17:33:22 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:37643
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nixt3-0007cA-He
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 17:33:21 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nixt3-0006Go-FP
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 22:33:21 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nixt2-0003Bk-RT
	for myserver-commit@gnu.org; Sat, 20 Feb 2010 22:33:21 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 59bb686116a92c5120388c2c08c6289e67dd49f1
X-Git-Newrev: 34fa5e73198b1f438024676e3e78a8adf59a6d4b
Message-Id: <E1Nixt2-0003Bk-RT@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 20 Feb 2010 22:33:21 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-21-g34fa5e7
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Feb 2010 22:33:25 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  34fa5e73198b1f438024676e3e78a8adf59a6d4b (commit)
      from  59bb686116a92c5120388c2c08c6289e67dd49f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 34fa5e73198b1f438024676e3e78a8adf59a6d4b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 20 22:44:52 2010 +0100

    Print to stderr the exception catched by `main'.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index da22a61..decc1a6 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -341,7 +341,7 @@ static MainConfiguration *genMainConf (Server *server, const char *arg)
 
 const char *program_name = NULL;
 
-int main  (int argn, char **argv)
+int main (int argn, char **argv)
 {
   program_name = argv[0];
   int runas = MYSERVER_RUNAS_CONSOLE;
@@ -365,10 +365,14 @@ int main  (int argn, char **argv)
     {
       Server::createInstance ();
     }
+  catch (exception & e)
+    {
+      cerr << e.what () << endl;
+      return 1;
+    }
   catch (...)
     {
-      /* Die if we get exceptions here.  */
-      return (1);
+      return 1;
     };
 
   u_int pathLen = 0;
@@ -435,6 +439,7 @@ int main  (int argn, char **argv)
            << "http://www.gnu.org/software/myserver" << endl;
       return 0;
     }
+
   if (input.useForkServer)
     {
       FilesUtility::resetTmpPath ();
@@ -446,13 +451,15 @@ int main  (int argn, char **argv)
    */
   try
     {
-      if (loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath,
+      const char *confFileDir;
 #ifdef WIN32
-                                 "."
+      confFileDir = ".";
 #else
-                                 input.confFilesLocation
+      confFileDir = input.confFilesLocation;
 #endif
-                                 ))
+
+      if (loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath,
+                                 confFileDir))
         {
           cout << _("Cannot find the configuration files, be sure they exist")
                << endl;
@@ -476,9 +483,7 @@ int main  (int argn, char **argv)
            * An error happened, return with errors.
            */
           if (pid < 0)
-            {
-              return 1;
-            }
+            return 1;
 
           if (pid)
             {
@@ -488,6 +493,7 @@ int main  (int argn, char **argv)
                 writePidfile ();
               return 0;
             }
+
           /*
            * Create a SID for the new process.
            */

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Feb 22 11:05:35 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Njamt-0004NE-J7
	for mharc-myserver-commit@gnu.org; Mon, 22 Feb 2010 11:05:35 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Njams-0004Kl-D1
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:05:34 -0500
Received: from [140.186.70.92] (port=44912 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Njamp-0004CM-Fh
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:05:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njamn-0007o5-21
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:05:31 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:42448
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njamm-0007o1-VU
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:05:29 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njamm-0002X1-V0
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 16:05:29 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Njamm-0001ka-Kh
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 16:05:28 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 34fa5e73198b1f438024676e3e78a8adf59a6d4b
X-Git-Newrev: 95371abb2377a4c70503531d45a548dc0a678925
Message-Id: <E1Njamm-0001ka-Kh@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 22 Feb 2010 16:05:28 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-25-g95371ab
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Feb 2010 16:05:34 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  95371abb2377a4c70503531d45a548dc0a678925 (commit)
       via  c8ee22bdb1ee47ef23a8553dc0903aaf4a6ddb5a (commit)
       via  30c2526c69c05471358299c04a44d0a129c4fb0c (commit)
       via  b9c635f390604b98846c410e95eed74f887b3feb (commit)
      from  34fa5e73198b1f438024676e3e78a8adf59a6d4b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 95371abb2377a4c70503531d45a548dc0a678925
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 22 16:31:34 2010 +0100

    Use lowercase Http headers as key for the `other' hashmap.

diff --git a/myserver/include/protocol/http/http_header.h b/myserver/include/protocol/http/http_header.h
index 3cb5f66..b088d47 100644
--- a/myserver/include/protocol/http/http_header.h
+++ b/myserver/include/protocol/http/http_header.h
@@ -28,9 +28,40 @@ using namespace std;
 
 struct HttpHeader
 {
-  virtual string* getValue (const char* name, string* out) = 0;
-  virtual string* setValue (const char* name, const char* in) = 0;
+  struct Entry
+  {
+    string *name;
+    string *value;
+    Entry ()
+    {
+      name = new string ();
+      value = new string ();
+    }
+
+    Entry (string& n, string& v)
+    {
+      name = new string ();
+      value = new string ();
+
+      name->assign (n);
+      value->assign (v);
+    }
+
+    ~Entry ()
+    {
+      delete name;
+      delete value;
+
+    }
+
+  };
+
+  virtual string* getValue (const char *name, string *out);
+  virtual string* setValue (const char *name, const char *in);
   virtual ~HttpHeader (){}
+
+  /* Key are stored lower-case.  */
+  HashMap<string, struct Entry *> other;
 };
 
 #endif
diff --git a/myserver/include/protocol/http/http_request.h b/myserver/include/protocol/http/http_request.h
index 4b82e45..8835b91 100644
--- a/myserver/include/protocol/http/http_request.h
+++ b/myserver/include/protocol/http/http_request.h
@@ -44,33 +44,6 @@ using namespace std;
  */
 struct HttpRequestHeader : public HttpHeader
 {
-  struct Entry
-  {
-    string *name;
-    string *value;
-    Entry ()
-    {
-      name = new string ();
-      value = new string ();
-    }
-
-    Entry (string& n, string& v)
-    {
-      name = new string ();
-      value = new string ();
-
-      name->assign (n);
-      value->assign (v);
-    }
-
-    ~Entry ()
-    {
-      delete name;
-      delete value;
-
-    }
-
-  };
   string cmd;
   string ver;
   string auth;
@@ -95,8 +68,6 @@ struct HttpRequestHeader : public HttpHeader
   char digestQop[16+1];
   char digestNc[10+1];
 
-
-  HashMap<string, HttpRequestHeader::Entry*> other;
   virtual string* getValue (const char* name, string* out);
   virtual string* setValue (const char* name, const char* in);
 
diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index 209d1b9..19d2895 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -44,37 +44,11 @@ struct HttpResponseHeader : public HttpHeader
   const static int CLIENT_ERROR = 400;
   const static int SERVER_ERROR = 500;
 
-  struct Entry
-  {
-    string *name;
-    string *value;
-    Entry ()
-    {
-      name = new string ();
-      value = new string ();
-    }
-
-    Entry (string& n, string& v)
-    {
-      name = new string ();
-      value = new string ();
-
-      name->assign (n);
-      value->assign (v);
-    }
-    ~Entry ()
-    {
-      delete name;
-      delete value;
-
-    }
-  };
   int httpStatus;
   string ver;
   string contentLength;
   string errorType;
 
-  HashMap<string,HttpResponseHeader::Entry*> other;
   HttpResponseHeader ();
   ~HttpResponseHeader ();
 
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 25ab040..7742053 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -316,7 +316,7 @@ int HttpDir::send (HttpThreadContext* td,
                                                         "%f%t%s");
 
 
-  HttpRequestHeader::Entry *host = td->request.other.get ("Host");
+  HttpRequestHeader::Entry *host = td->request.other.get ("host");
 
   chain.setStream (td->connection->socket);
   if ( !(td->permissions & MYSERVER_PERMISSION_BROWSE))
@@ -337,7 +337,7 @@ int HttpDir::send (HttpThreadContext* td,
 
   checkDataChunks (td, &keepalive, &useChunks);
 
-  td->response.setValue ("Content-type", "text/html");
+  td->response.setValue ("content-type", "text/html");
 
   ignPattern = td->securityToken.getData ("http.dir.ignore",
                                           MYSERVER_SECURITY_CONF
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index e59ca9d..8f99b96 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -49,7 +49,7 @@ int HttpFile::putFile (HttpThreadContext* td, string& filename)
   try
   {
     if (td->request.isKeepAlive ())
-      td->response.setValue ("Connection", "keep-alive");
+      td->response.setValue ("connection", "keep-alive");
 
     if (!(td->permissions & MYSERVER_PERMISSION_WRITE))
       return td->http->sendAuth ();
@@ -241,10 +241,10 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
         return td->http->raiseHTTPError (500);
 
       getRFC822GMTTime (lastMT, tmpTime, 32);
-      td->response.setValue ("Last-Modified", tmpTime.c_str ());
+      td->response.setValue ("last-modified", tmpTime.c_str ());
 
       HttpRequestHeader::Entry *ifModifiedSince =
-        td->request.other.get ("Last-Modified");
+        td->request.other.get ("last-modified");
 
       if (ifModifiedSince && ifModifiedSince->value->length () &&
           !ifModifiedSince->value->compare (tmpTime))
@@ -262,18 +262,18 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
     string etag;
     generateEtag (etag, lastMT, filesize);
 
-    HttpRequestHeader::Entry *etagHeader = td->request.other.get ("ETag");
+    HttpRequestHeader::Entry *etagHeader = td->request.other.get ("etag");
     if (etagHeader &&  !etagHeader->value->compare (etag))
       return td->http->sendHTTPNonModified ();
     else
       {
-        HttpResponseHeader::Entry *e = td->response.other.get ("Etag");
+        HttpResponseHeader::Entry *e = td->response.other.get ("etag");
         if (e)
           e->value->assign (etag);
         else
           {
             e = new HttpResponseHeader::Entry ();
-            e->name->assign ("Etag");
+            e->name->assign ("etag");
             e->value->assign (etag);
             td->response.other.put (*(e->name), e);
           }
@@ -320,13 +320,13 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
         buffer << "bytes "<< (u_long)firstByte << "-"
                << (u_long) (lastByte - 1) << "/" << (u_long)filesize;
 
-        e = td->response.other.get ("Content-range");
+        e = td->response.other.get ("content-range");
         if (e)
           e->value->assign (buffer.str ());
         else
           {
             e = new HttpResponseHeader::Entry ();
-            e->name->assign ("Content-range");
+            e->name->assign ("content-range");
             e->value->assign (buffer.str ());
             td->response.other.put (*(e->name), e);
           }
@@ -336,7 +336,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
     chain.setStream (&memStream);
     if (td->mime)
       {
-        HttpRequestHeader::Entry* e = td->request.other.get ("Accept-encoding");
+        HttpRequestHeader::Entry* e = td->request.other.get ("accept-encoding");
         if (td->mime &&
             Server::getInstance ()->getFiltersFactory ()->chain (&chain,
                                                                  td->mime->filters,
@@ -363,23 +363,23 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
       }
 
     if (keepalive)
-      td->response.setValue ("Connection", "keep-alive");
+      td->response.setValue ("connection", "keep-alive");
     else
-      td->response.setValue ("Connection", "close");
+      td->response.setValue ("connection", "close");
 
     if (useModifiers)
       {
         string s;
         HttpResponseHeader::Entry *e;
         chain.getName (s);
-        e = td->response.other.get ("Content-encoding");
+        e = td->response.other.get ("content-encoding");
 
         if (e)
           e->value->assign (s);
         else
           {
             e = new HttpResponseHeader::Entry ();
-            e->name->assign ("Content-encoding");
+            e->name->assign ("content-encoding");
             e->value->assign (s);
             td->response.other.put (*(e->name), e);
           }
@@ -391,20 +391,20 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
     if (useChunks)
       {
         HttpResponseHeader::Entry *e;
-        e = td->response.other.get ("Transfer-encoding");
+        e = td->response.other.get ("transfer-encoding");
         if (e)
           e->value->assign ("chunked");
         else
           {
             e = new HttpResponseHeader::Entry ();
-            e->name->assign ("Transfer-encoding");
+            e->name->assign ("transfer-encoding");
             e->value->assign ("chunked");
             td->response.other.put (*(e->name), e);
           }
       }
     else
       {	HttpResponseHeader::Entry *e;
-        e = td->response.other.remove ("Transfer-encoding");
+        e = td->response.other.remove ("transfer-encoding");
         if (e)
           delete e;
       }
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 9724871..e2adc2b 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -215,7 +215,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
     return HttpDataHandler::RET_FAILURE;
 
   buffer= (char*)ConnInfo->td->buffer->getBuffer ();
-  HttpRequestHeader::Entry *connection = ConnInfo->td->request.other.get ("Connection");
+  HttpRequestHeader::Entry *connection = ConnInfo->td->request.other.get ("connection");
 
   if (ConnInfo == NULL)
   {
@@ -277,19 +277,19 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
               if (keepalive)
                 {
                   HttpResponseHeader::Entry *e;
-                  e = ConnInfo->td->response.other.get ("Transfer-encoding");
+                  e = ConnInfo->td->response.other.get ("transfer-encoding");
                   if (e)
                     e->value->assign ("chunked");
                   else
                     {
                       e = new HttpResponseHeader::Entry ();
-                      e->name->assign ("Transfer-encoding");
+                      e->name->assign ("transfer-encoding");
                       e->value->assign ("chunked");
                       ConnInfo->td->response.other.put (*(e->name), e);
                     }
                 }
               else
-                ConnInfo->td->response.setValue ("Connection", "Close");
+                ConnInfo->td->response.setValue ("connection", "Close");
 
               if (HttpHeaders::sendHeader (ConnInfo->td->response,
                                            *ConnInfo->td->connection->socket,
@@ -493,8 +493,8 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   DWORD valLen = 0;
   DWORD maxLen = *dwMaxLen;
   char *ValStr=(char*)output;
-  HttpRequestHeader::Entry *accept = td->request.other.get ("Accept");
-  HttpRequestHeader::Entry *cache = td->request.other.get ("Cache-Control");
+  HttpRequestHeader::Entry *accept = td->request.other.get ("accept");
+  HttpRequestHeader::Entry *cache = td->request.other.get ("cache-control");
 
   if (accept && accept->value->length () && (valLen+30<maxLen))
     valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT:%s\n",
@@ -524,7 +524,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Encoding");
+    HttpRequestHeader::Entry* e = td->request.other.get ("accept-encoding");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen], "HTTP_ACCEPT_ENCODING:%s\n",
                          e->value->c_str ());
@@ -533,7 +533,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Language");
+    HttpRequestHeader::Entry* e = td->request.other.get ("accept-language");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT_LANGUAGE:%s\n",
                          e->value->c_str ());
@@ -543,7 +543,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
 
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Charset");
+    HttpRequestHeader::Entry* e = td->request.other.get ("accept-charset");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT_CHARSET:%s\n",
                          e->value->c_str ());
@@ -552,7 +552,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Pragma");
+    HttpRequestHeader::Entry* e = td->request.other.get ("pragma");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_PRAGMA:%s\n",
                          e->value->c_str ());
@@ -561,7 +561,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Connection");
+    HttpRequestHeader::Entry* e = td->request.other.get ("connection");
     if (e && (valLen + 30< maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_CONNECTION:%s\n",
                          e->value->c_str ());
@@ -570,7 +570,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Cookie");
+    HttpRequestHeader::Entry* e = td->request.other.get ("cookie");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_COOKIE:%s\n",
                          e->value->c_str ());
@@ -579,7 +579,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Host");
+    HttpRequestHeader::Entry* e = td->request.other.get ("host");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_HOST:%s\n",
                          e->value->c_str ());
@@ -588,7 +588,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Date");
+    HttpRequestHeader::Entry* e = td->request.other.get ("date");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_DATE:%s\n",
                          e->value->c_str ());
@@ -597,7 +597,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("If-Modified-Since");
+    HttpRequestHeader::Entry* e = td->request.other.get ("if-modified-since");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_IF_MODIFIED_SINCE:%s\n",
                          e->value->c_str ());
@@ -606,7 +606,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("Referer");
+    HttpRequestHeader::Entry* e = td->request.other.get ("referer");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_REFERER:%s\n",
                          e->value->c_str ());
@@ -615,7 +615,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("User-Agent");
+    HttpRequestHeader::Entry* e = td->request.other.get ("user-agent");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_USER_AGENT:%s\n",
                          e->value->c_str ());
@@ -624,7 +624,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
   }
 
   {
-    HttpRequestHeader::Entry* e = td->request.other.get ("From");
+    HttpRequestHeader::Entry* e = td->request.other.get ("from");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_FROM:%s\n",
                          e->value->c_str ());
@@ -883,7 +883,7 @@ int Isapi::send (HttpThreadContext* td,
   ExtCtrlBlk.lpbData = 0;
 
 
-  HttpRequestHeader::Entry *content = td->request.other.get ("Content-type");
+  HttpRequestHeader::Entry *content = td->request.other.get ("content-type");
   ExtCtrlBlk.lpszContentType = content ? (char*)content->value->c_str () : NULL;
 
   connTable[connIndex].td->buffer->setLength (0);
@@ -903,7 +903,7 @@ int Isapi::send (HttpThreadContext* td,
 
   {
     u_long nbw = 0;
-    HttpRequestHeader::Entry *connection = connTable[connIndex].td->request.other.get ("Connection");
+    HttpRequestHeader::Entry *connection = connTable[connIndex].td->request.other.get ("connection");
 
     if (connection && !stringcmpi (connection->value->c_str (), "keep-alive"))
       Ret = connTable[connIndex].chain.getStream ()->write ("0\r\n\r\n", 5, &nbw);
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index 8122d43..6f41ebb 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -171,7 +171,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
     }
 
   {
-    HttpRequestHeader::Entry *referer = td->request.other.get ("Referer");
+    HttpRequestHeader::Entry *referer = td->request.other.get ("referer");
 
     if (referer && referer->value->length ())
       {
@@ -181,7 +181,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   }
 
   {
-    HttpRequestHeader::Entry *contentType = td->request.other.get ("Content-type");
+    HttpRequestHeader::Entry *contentType = td->request.other.get ("content-type");
 
     if (contentType && contentType->value->length ())
       {
@@ -191,7 +191,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   }
 
   {
-    HttpRequestHeader::Entry *userAgent = td->request.other.get ("User-Agent");
+    HttpRequestHeader::Entry *userAgent = td->request.other.get ("user-agent");
 
     if (userAgent && userAgent->value->length ())
       {
@@ -225,7 +225,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   DataFileHandle.writeToFile (buffer, (u_long)strlen (buffer), &nbr);
 
   {
-    HttpRequestHeader::Entry *host = td->request.other.get ("Host");
+    HttpRequestHeader::Entry *host = td->request.other.get ("host");
     if (host)
       sprintf (buffer, "Server Name=%s\r\n", host->value->c_str ());
     DataFileHandle.writeToFile (buffer, (u_long)strlen (buffer), &nbr);
@@ -330,7 +330,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
     }
 
   if (td->request.isKeepAlive ())
-    td->response.setValue ("Connection", "keep-alive");
+    td->response.setValue ("connection", "keep-alive");
 
   HttpHeaders::buildHTTPResponseHeaderStruct (buffer, &td->response, &(td->nBytesToRead));
 
diff --git a/myserver/src/protocol/http/Makefile.am b/myserver/src/protocol/http/Makefile.am
index 4a9ffbe..ebba91c 100644
--- a/myserver/src/protocol/http/Makefile.am
+++ b/myserver/src/protocol/http/Makefile.am
@@ -16,7 +16,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
 lib_LIBRARIES = libhttp.a
-libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp http_errors.cpp http_headers.cpp http_request.cpp http_req_security_domain.cpp http_response.cpp http_thread_context.cpp dyn_http_manager.cpp dyn_http_manager_list.cpp dyn_http_command.cpp dyn_http_command_manager.cpp
+libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp \
+	           http_errors.cpp  http_header.cpp http_headers.cpp \
+		   http_request.cpp http_req_security_domain.cpp \
+		   http_response.cpp http_thread_context.cpp \
+		   dyn_http_manager.cpp dyn_http_manager_list.cpp \
+		   dyn_http_command.cpp dyn_http_command_manager.cpp
 SUBDIRS = env
 AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index 552c53e..b506d35 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -204,7 +204,7 @@ void Env::buildEnvironmentString (HttpThreadContext* td, char *cgiEnv,
   memCgi << td->request.auth.c_str ();
 
 
-  reqEntry = td->request.other.get ("Content-type");
+  reqEntry = td->request.other.get ("content-type");
 
   if (reqEntry)
   {
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index ea1e4c6..f58896c 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -134,7 +134,7 @@ int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
 
   try
     {
-      HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
+      HttpRequestHeader::Entry *connection = td->request.other.get ("connection");
       string methods ("OPTIONS, GET, POST, HEAD, DELETE, PUT, TRACE");
 
       HashMap<string, DynamicHttpCommand*>::Iterator it =
@@ -204,7 +204,7 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
       *td->auxiliaryBuffer << "HTTP/1.1 200 OK\r\n";
       *td->auxiliaryBuffer << "Date: " << time << "\r\n";
       *td->auxiliaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
-      connection = td->request.other.get ("Connection");
+      connection = td->request.other.get ("connection");
       if (connection && connection->value->length ())
         *td->auxiliaryBuffer << "Connection:" << connection->value->c_str () << "\r\n";
 
@@ -466,7 +466,7 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
   try
     {
       if (td->request.isKeepAlive ())
-        td->response.setValue ("Connection", "keep-alive");
+        td->response.setValue ("connection", "keep-alive");
 
       ret = getFilePermissions (filename, directory, file,
                                 td->filenamePath, yetmapped, permissions);
@@ -715,12 +715,12 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
       /* If not specified differently, set the default content type to text/html.  */
       if (td->mime)
         {
-          td->response.setValue ("Content-type", td->mime->mimeType.c_str ());
+          td->response.setValue ("content-type", td->mime->mimeType.c_str ());
           cgiManager = td->mime->cgiManager.c_str ();
         }
       else
         {
-          td->response.setValue ("Content-type", "text/html");
+          td->response.setValue ("content-type", "text/html");
           cgiManager = "";
         }
 
@@ -808,8 +808,8 @@ int Http::logHTTPaccess ()
 
       if (td->connection->host)
         {
-          HttpRequestHeader::Entry *userAgent = td->request.other.get ("User-Agent");
-          HttpRequestHeader::Entry *referer = td->request.other.get ("Refer");
+          HttpRequestHeader::Entry *userAgent = td->request.other.get ("user-agent");
+          HttpRequestHeader::Entry *referer = td->request.other.get ("refer");
 
           if (strstr ((td->connection->host)->getAccessLogOpt (), "type=combined"))
             *td->auxiliaryBuffer << " " << (referer ? referer->value->c_str () : "")
@@ -934,7 +934,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
       if (td->request.ver.compare ("HTTP/1.1"))
         {
           HttpRequestHeader::Entry *connection =
-                  td->request.other.get ("Connection");
+                  td->request.other.get ("connection");
 
           if (connection && connection->value->length ())
             connection->value->assign ("close");
@@ -994,7 +994,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
            * Servers MUST reports a 400 (Bad request) error if an HTTP/1.1
            * request does not include a Host request-header.
            */
-          HttpRequestHeader::Entry *host = td->request.other.get ("Host");
+          HttpRequestHeader::Entry *host = td->request.other.get ("host");
 
           if (host == NULL || (!td->request.ver.compare ("HTTP/1.1")
                                && host->value->length () == 0))
@@ -1207,7 +1207,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
 
       bool keepalive = false;
       HttpRequestHeader::Entry *connection = td->request.other.get
-                                                       ("Connection");
+                                                       ("connection");
       if (connection)
         keepalive = !stringcmpi (connection->value->c_str (), "keep-alive");
 
@@ -1254,8 +1254,8 @@ int Http::requestAuthorization ()
 {
   Md5 md5;
   string time;
-  HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
-  HttpRequestHeader::Entry *host = td->request.other.get ("Host");
+  HttpRequestHeader::Entry *connection = td->request.other.get ("connection");
+  HttpRequestHeader::Entry *host = td->request.other.get ("host");
   td->response.httpStatus = 401;
   td->auxiliaryBuffer->setLength (0);
   *td->auxiliaryBuffer << "HTTP/1.1 401 Unauthorized\r\n"
@@ -1351,8 +1351,8 @@ int Http::raiseHTTPError (int ID)
       ostringstream errorBodyMessage;
       int errorBodyLength = 0;
       int useMessagesFiles = 1;
-      HttpRequestHeader::Entry *host = td->request.other.get ("Host");
-      HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
+      HttpRequestHeader::Entry *host = td->request.other.get ("host");
+      HttpRequestHeader::Entry *connection = td->request.other.get ("connection");
       const char *useMessagesVal = td->securityToken.getData ("http.use_error_file",
                                                               MYSERVER_VHOST_CONF
                                                               | MYSERVER_SERVER_CONF,
@@ -1376,7 +1376,7 @@ int Http::raiseHTTPError (int ID)
       HttpHeaders::buildDefaultHTTPResponseHeader (&(td->response));
 
       if (connection && !stringcmpi (connection->value->c_str (), "keep-alive"))
-        td->response.setValue ("Connection", "keep-alive");
+        td->response.setValue ("connection", "keep-alive");
 
       td->response.httpStatus = ID;
 
@@ -1691,7 +1691,7 @@ int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
 int Http::sendHTTPRedirect (const char *newURL)
 {
   string time;
-  HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
+  HttpRequestHeader::Entry *connection = td->request.other.get ("connection");
 
   td->response.httpStatus = 302;
   td->auxiliaryBuffer->setLength (0);
@@ -1726,7 +1726,7 @@ int Http::sendHTTPRedirect (const char *newURL)
 int Http::sendHTTPNonModified ()
 {
   string time;
-  HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
+  HttpRequestHeader::Entry *connection = td->request.other.get ("connection");
 
   td->response.httpStatus = 304;
   td->auxiliaryBuffer->setLength (0);
diff --git a/myserver/src/protocol/http/http_data_handler.cpp b/myserver/src/protocol/http/http_data_handler.cpp
index 4742532..216cb05 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -204,13 +204,13 @@ HttpDataHandler::checkDataChunks (HttpThreadContext* td, bool* keepalive,
   if (*keepalive)
     {
       HttpResponseHeader::Entry *e;
-      e = td->response.other.get ("Transfer-encoding");
+      e = td->response.other.get ("transfer-encoding");
       if (e)
         e->value->assign ("chunked");
       else
         {
           e = new HttpResponseHeader::Entry ();
-          e->name->assign ("Transfer-encoding");
+          e->name->assign ("transfer-encoding");
           e->value->assign ("chunked");
           td->response.other.put (*(e->name), e);
         }
diff --git a/myserver/src/protocol/http/http_data_read.cpp b/myserver/src/protocol/http/http_data_read.cpp
index 4fcde2f..aeb5852 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -243,16 +243,16 @@ int HttpDataRead::readPostData (HttpThreadContext* td, int* httpRetCode)
   u_long length;
 
   HttpRequestHeader::Entry *contentType =
-    td->request.other.get ("Content-type");
+    td->request.other.get ("content-type");
 
   HttpRequestHeader::Entry *encoding =
-    td->request.other.get ("Transfer-encoding");
+    td->request.other.get ("transfer-encoding");
 
   /* Specify a type if it not specified by the client.  */
   if (contentType == 0)
   {
     contentType = new HttpRequestHeader::Entry ();
-    contentType->name->assign ("Content-type");
+    contentType->name->assign ("content-type");
     contentType->value->assign ("application/x-www-form-urlencoded");
   }
   else if (contentType->value->length () == 0)
@@ -284,7 +284,7 @@ int HttpDataRead::readPostData (HttpThreadContext* td, int* httpRetCode)
   if (!contentLengthSpecified && td->request.isKeepAlive ())
   {
     HttpRequestHeader::Entry *content =
-      td->request.other.get ("Content-Encoding");
+      td->request.other.get ("content-encoding");
 
     if (content && (content->value->length () == '\0')
            && (td->request.contentLength.length () == 0))
diff --git a/myserver/src/protocol/http/http_header.cpp b/myserver/src/protocol/http/http_header.cpp
new file mode 100644
index 0000000..791a37d
--- /dev/null
+++ b/myserver/src/protocol/http/http_header.cpp
@@ -0,0 +1,70 @@
+/*
+MyServer
+Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software
+Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "myserver.h"
+#include <sstream>
+#include <include/protocol/http/http_header.h>
+
+#include <string>
+#include <algorithm>
+
+using namespace std;
+
+/*!
+ * Get the value of the [name] field.
+ */
+string* HttpHeader::getValue (const char *name, string *out)
+{
+  string key (name);
+  transform (key.begin (), str.end (), str.begin (), ::tolower);
+
+  Entry *e = other.get (str);
+  if (e)
+    {
+      if (out)
+        out->assign (*(e->value));
+      return e->value;
+    }
+
+  return NULL;
+}
+
+/*!
+ * Set the value of the [name] field to [in].
+ */
+string* HttpHeader::setValue (const char *name, const char *in)
+{
+  string key (name);
+  transform (key.begin (), key.end (), key.begin (), ::tolower);
+
+  Entry *e = other.get (key);
+  if (e)
+    {
+      e->value->assign (in);
+      return (e->value);
+    }
+  else
+    {
+      e = new Entry;
+      e->name->assign (name);
+      e->value->assign (in);
+      other.put (key, e);
+    }
+
+  return NULL;
+}
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 8956b8c..05bce44 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -75,7 +75,7 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
        * Do not specify the Content-length field if it is used
        * the chunked Transfer-encoding.
        */
-      HttpResponseHeader::Entry *e = response->other.get ("Transfer-encoding");
+      HttpResponseHeader::Entry *e = response->other.get ("transfer-encoding");
 
       if (!e || (e && e->value->find ("chunked", 0) == string::npos ))
         {
@@ -206,7 +206,7 @@ void HttpHeaders::buildDefaultHTTPResponseHeader (HttpResponseHeader* response)
 {
   resetHTTPResponse (response);
 
-  response->setValue ("Content-type", "text/html");
+  response->setValue ("content-type", "text/html");
   response->ver.assign ("HTTP/1.1");
   response->setValue ("Server", "GNU MyServer " MYSERVER_VERSION);
 }
@@ -223,7 +223,7 @@ void HttpHeaders::buildDefaultHTTPRequestHeader (HttpRequestHeader* request)
   request->uri.assign ("/");
 
   /* HTTP/1.1 MUST specify a host.  */
-  request->setValue ("Host", "localhost");
+  request->setValue ("host", "localhost");
   request->uriOpts.assign ("");
   request->uriOptsPtr = 0;
 }
@@ -577,6 +577,8 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
             return 400;
 
           string cmdStr (command);
+          transform (cmdStr.begin (), cmdStr.end (), cmdStr.begin (),
+                     ::tolower);
           HttpRequestHeader::Entry *old = request->other.get (cmdStr);
           if (old)
             {
@@ -589,8 +591,8 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           else
             {
               HttpRequestHeader::Entry *e = new HttpRequestHeader::Entry ();
-              e->name->assign (command, std::min (HTTP_RESPONSE_OTHER_DIM,
-                                                  tokenOff));
+              e->name->assign (cmdStr.c_str (),
+                               std::min (HTTP_RESPONSE_OTHER_DIM, tokenOff));
               e->value->assign (token, std::min (HTTP_RESPONSE_OTHER_DIM,
                                                  tokenOff));
               request->other.put (cmdStr, e);
@@ -1059,14 +1061,15 @@ int HttpHeaders::buildHTTPResponseHeaderStruct (const char *input,
                 break;
               }
 
-            if (! strcasecmp (command, "Content-type"))
+            if (! strcasecmp (command, "content-type"))
               append = false;
 
             HttpResponseHeader::Entry *old = NULL;
             HttpResponseHeader::Entry *e = new HttpResponseHeader::Entry ();
             e->name->assign (command);
-            string cmdString (command);
-            old = response->other.put (cmdString, e);
+            transform (e->name->begin (), e->name->end (), e->name->begin (),
+                       ::tolower);
+            old = response->other.put (*e->name, e);
             if (old)
               {
                 if (append)
diff --git a/myserver/src/protocol/http/http_request.cpp b/myserver/src/protocol/http/http_request.cpp
index 2cbfeea..9249d8b 100644
--- a/myserver/src/protocol/http/http_request.cpp
+++ b/myserver/src/protocol/http/http_request.cpp
@@ -1,19 +1,19 @@
 /*
-MyServer
-Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation,
-Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation,
+  Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "myserver.h"
@@ -79,16 +79,16 @@ void HttpRequestHeader::free ()
 }
 
 /*!
- *Check if this request is keep-alive.
+ * Check if this request is keep-alive.
  */
 bool HttpRequestHeader::isKeepAlive ()
 {
-    Entry *connection = other.get ("Connection");
-    if (connection)
-      return (! stringcmpi (*connection->value,
-                            "keep-alive"));
+  Entry *connection = other.get ("connection");
+  if (connection)
+    return (! stringcmpi (*connection->value,
+                          "keep-alive"));
 
-    return false;
+  return false;
 }
 
 /*!
@@ -97,161 +97,134 @@ bool HttpRequestHeader::isKeepAlive ()
 string* HttpRequestHeader::getValue (const char* name, string* out)
 {
   if (! strcasecmp (name, "cmd"))
-  {
-    if (out)
-      out->assign (cmd.c_str ());
-    return &cmd;
-  }
+    {
+      if (out)
+        out->assign (cmd.c_str ());
+      return &cmd;
+    }
 
   if (! strcasecmp (name, "ver"))
-  {
-    if (out)
-      out->assign (ver.c_str ());
-    return &ver;
-  }
+    {
+      if (out)
+        out->assign (ver.c_str ());
+      return &ver;
+    }
 
   if (! strcasecmp (name, "uri"))
-  {
-    if (out)
-      out->assign (uri.c_str ());
-    return &uri;
-  }
+    {
+      if (out)
+        out->assign (uri.c_str ());
+      return &uri;
+    }
 
   if (! strcasecmp (name, "uriOpts"))
-  {
-    if (out)
-      out->assign (uriOpts.c_str ());
-    return &uriOpts;
-  }
-
- if (! strcasecmp (name, "Authorization"))
- {
-   if (out)
-     out->assign (auth.c_str ());
-   return &auth;
- }
-
- if (! strcasecmp (name, "Content-length"))
- {
-   if (out)
-     out->assign (contentLength.c_str ());
-   return &contentLength;
- }
-
- if (! strcasecmp (name, "rangeType"))
- {
-   if (out)
-     out->assign (rangeType.c_str ());
-   return &rangeType;
- }
-
- if (! strcasecmp (name, "rangeByteBegin"))
- {
-   ostringstream s;
-   s << rangeByteBegin;
-   if (out)
-     out->assign (s.str ());
-   return 0;
- }
-
- if (! strcasecmp (name, "rangeByteEnd"))
- {
-   ostringstream s;
-   s << rangeByteEnd;
-   if (out)
-     out->assign (s.str ());
-   return 0;
- }
-
- {
-   HttpRequestHeader::Entry *e = other.get (name);
-   if (e)
-   {
-     if (out)
-       out->assign (*(e->value));
-     return (e->value);
-   }
-   return 0;
- }
-
+    {
+      if (out)
+        out->assign (uriOpts.c_str ());
+      return &uriOpts;
+    }
+
+  if (! strcasecmp (name, "Authorization"))
+    {
+      if (out)
+        out->assign (auth.c_str ());
+      return &auth;
+    }
+
+  if (! strcasecmp (name, "Content-length"))
+    {
+      if (out)
+        out->assign (contentLength.c_str ());
+      return &contentLength;
+    }
+
+  if (! strcasecmp (name, "rangeType"))
+    {
+      if (out)
+        out->assign (rangeType.c_str ());
+      return &rangeType;
+    }
+
+  if (! strcasecmp (name, "rangeByteBegin"))
+    {
+      ostringstream s;
+      s << rangeByteBegin;
+      if (out)
+        out->assign (s.str ());
+      return 0;
+    }
+
+  if (! strcasecmp (name, "rangeByteEnd"))
+    {
+      ostringstream s;
+      s << rangeByteEnd;
+      if (out)
+        out->assign (s.str ());
+      return 0;
+    }
+
+  return HttpHeader::getValue (name, out);
 }
 
 
-
 /*!
  *Set the value of the [name] field to [in].
  */
-string* HttpRequestHeader::setValue (const char* name, const char* in)
+string* HttpRequestHeader::setValue (const char *name, const char *in)
 {
   if (! strcasecmp (name, "cmd"))
-  {
-    cmd.assign (in);
-    return &cmd;
-  }
+    {
+      cmd.assign (in);
+      return &cmd;
+    }
 
   if (! strcasecmp (name, "ver"))
-  {
-    ver.assign (in);
-    return &ver;
-  }
+    {
+      ver.assign (in);
+      return &ver;
+    }
 
   if (! strcasecmp (name, "uri"))
-  {
-    uri.assign (in);
-    return &uri;
-  }
+    {
+      uri.assign (in);
+      return &uri;
+    }
 
   if (! strcasecmp (name, "uriOpts"))
-  {
-    uriOpts.assign (in);
-    return &uriOpts;
-  }
-
- if (! strcasecmp (name, "Authorization"))
- {
-   auth.assign (in);
-   return &auth;
- }
-
- if (! strcasecmp (name, "Content-length"))
- {
-   contentLength.assign (in);
-   return &contentLength;
- }
-
- if (! strcasecmp (name, "rangeType"))
- {
-   rangeType.assign (in);
-   return &rangeType;
- }
-
- if (! strcasecmp (name, "rangeByteBegin"))
- {
-   rangeByteBegin = atoi (in);
-   return 0;
- }
-
- if (! strcasecmp (name, "rangeByteEnd"))
- {
-   rangeByteEnd = atoi (in);
-   return 0;
- }
-
- {
-   HttpRequestHeader::Entry *e = other.get (name);
-   if (e)
-   {
-     e->value->assign (in);
-     return (e->value);
-   }
-   else
-   {
-     e = new HttpRequestHeader::Entry;
-     e->name->assign (name);
-     e->value->assign (in);
-     other.put (*e->name, e);
-   }
-   return 0;
- }
-
+    {
+      uriOpts.assign (in);
+      return &uriOpts;
+    }
+
+  if (! strcasecmp (name, "Authorization"))
+    {
+      auth.assign (in);
+      return &auth;
+    }
+
+  if (! strcasecmp (name, "Content-length"))
+    {
+      contentLength.assign (in);
+      return &contentLength;
+    }
+
+  if (! strcasecmp (name, "rangeType"))
+    {
+      rangeType.assign (in);
+      return &rangeType;
+    }
+
+  if (! strcasecmp (name, "rangeByteBegin"))
+    {
+      rangeByteBegin = atoi (in);
+      return 0;
+    }
+
+  if (! strcasecmp (name, "rangeByteEnd"))
+    {
+      rangeByteEnd = atoi (in);
+      return 0;
+    }
+
+  return HttpHeader::setValue (name, in);
 }
diff --git a/myserver/src/protocol/http/http_response.cpp b/myserver/src/protocol/http/http_response.cpp
index 79172be..83577ab 100644
--- a/myserver/src/protocol/http/http_response.cpp
+++ b/myserver/src/protocol/http/http_response.cpp
@@ -77,14 +77,7 @@ string* HttpResponseHeader::getValue (const char* name, string* out)
       return &contentLength;
     }
 
-  HttpResponseHeader::Entry *e = other.get (name);
-  if (e)
-    {
-      if (out)
-        out->assign (*(e->value));
-      return e->value;
-    }
-  return 0;
+  return HttpHeader::getValue (name, out);
 }
 
 /*!
@@ -104,23 +97,7 @@ string* HttpResponseHeader::setValue (const char* name, const char* in)
       return &contentLength;
     }
 
-  {
-    HttpResponseHeader::Entry *e = other.get (name);
-    if (e)
-      {
-        e->value->assign (in);
-        return (e->value);
-      }
-    else
-      {
-        e = new HttpResponseHeader::Entry;
-        e->name->assign (name);
-        e->value->assign (in);
-        other.put (*e->name, e);
-      }
-
-    return 0;
-  }
+  return HttpHeader::setValue (name, in);
 }
 
 /*!
diff --git a/myserver/tests/test_http_req_security_domain.cpp b/myserver/tests/test_http_req_security_domain.cpp
index fa35a58..f729b28 100644
--- a/myserver/tests/test_http_req_security_domain.cpp
+++ b/myserver/tests/test_http_req_security_domain.cpp
@@ -72,6 +72,7 @@ public:
 
     string *ret = dom->getValue (nameStr);
 
+    CPPUNIT_ASSERT (ret);
     CPPUNIT_ASSERT_EQUAL (ret->compare (value), 0);
 
     delete dom;
diff --git a/myserver/tests/test_http_request.cpp b/myserver/tests/test_http_request.cpp
index c2dc13e..e96a964 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.cpp
@@ -120,6 +120,8 @@ public:
     CPPUNIT_ASSERT (header.ver.compare ("HTTP/1.1") == 0);
     CPPUNIT_ASSERT (header.uri.compare ("/resource") == 0);
     CPPUNIT_ASSERT (header.uriOpts.compare ("args") == 0);
+
+    CPPUNIT_ASSERT (header.getValue ("Host", 0));
     CPPUNIT_ASSERT (header.getValue ("Host", 0)->compare ("localhost") == 0);
   }
 



commit c8ee22bdb1ee47ef23a8553dc0903aaf4a6ddb5a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 22 15:46:28 2010 +0100

    Move strupr from stringutils to mime_utils.

diff --git a/myserver/include/base/string/stringutils.h b/myserver/include/base/string/stringutils.h
index 182be32..214d44c 100644
--- a/myserver/include/base/string/stringutils.h
+++ b/myserver/include/base/string/stringutils.h
@@ -81,11 +81,4 @@ int stringcmp (string const &a, string const &b);
 int stringcmpi (string const &a, const char* b);
 int stringcmp (string const &a, const char* b);
 
-# ifndef WIN32
-extern "C"
-{
-  char* strupr (char * string);
-}
-# endif
-
 #endif
diff --git a/myserver/src/base/base64/mime_utils.cpp b/myserver/src/base/base64/mime_utils.cpp
index aec95e9..390fbb8 100644
--- a/myserver/src/base/base64/mime_utils.cpp
+++ b/myserver/src/base/base64/mime_utils.cpp
@@ -33,6 +33,14 @@ extern "C"
 #include <include/base/string/stringutils.h>
 #include <include/base/string/securestr.h>
 
+static char* myserver_strupr (char * s)
+{
+  unsigned int len = strlen (s);
+  for (register unsigned int i = 0; i < len; i++)
+    s[i] = toupper (s[i]);
+  return s;
+}
+
 #define strupos(x, y) (strustr (x, y) != NULL ? strustr (x, y) - x : -1)
 
 static char* strustr (char *source, char *s)
@@ -49,8 +57,8 @@ static char* strustr (char *source, char *s)
   }
   strncpy (csource, source, (strlen (source) + 2));
   strncpy (cs, s, (strlen (s) + 2));
-  strupr (csource);
-  strupr (cs);
+  myserver_strupr (csource);
+  myserver_strupr (cs);
   char *result = strstr (csource, cs);
   if (result != NULL)
   {
@@ -574,7 +582,7 @@ char* CQPUtils::encode (char *input)
 
       snprintf (mids, 3, "%X", mid);
 
-      strupr (mids);
+      myserver_strupr (mids);
       *(fresult++) = '=';
       *(fresult++) = mids[0];
       *(fresult++) = mids[1];
diff --git a/myserver/src/base/string/stringutils.cpp b/myserver/src/base/string/stringutils.cpp
index 87ec4fa..f14c505 100644
--- a/myserver/src/base/string/stringutils.cpp
+++ b/myserver/src/base/string/stringutils.cpp
@@ -864,13 +864,3 @@ int stringcmp (string const &a, const char* b)
 {
   return strcmp (a.c_str (), b);
 }
-
-#ifndef WIN32
-char* strupr (char * s)
-{
-  unsigned int len = strlen (s);
-  for (register unsigned int i = 0; i < len; i++)
-    s[i] = toupper (s[i]);
-  return s;
-}
-#endif



commit 30c2526c69c05471358299c04a44d0a129c4fb0c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 22 14:57:56 2010 +0100

    make install doesn't overwrite configuration files.

diff --git a/myserver/binaries/Makefile.am b/myserver/binaries/Makefile.am
index 5955626..3731bfc 100644
--- a/myserver/binaries/Makefile.am
+++ b/myserver/binaries/Makefile.am
@@ -22,6 +22,6 @@ EXTRA_DIST = myserver-daemon MIMEtypes.default.xml myserver.default.xml \
 configdir = $(DESTDIR)$(prefix)/etc/myserver
 
 install: install-recursive
-	$(install_sh_DATA) MIMEtypes.default.xml $(configdir)/MIMEtypes.xml
-	$(install_sh_DATA) myserver.default.xml $(configdir)/myserver.xml
-	$(install_sh_DATA) virtualhosts.default.xml $(configdir)/virtualhosts.xml
+	$(install_sh_DATA) MIMEtypes.default.xml $(configdir)/MIMEtypes.default.xml
+	$(install_sh_DATA) myserver.default.xml $(configdir)/myserver.default.xml
+	$(install_sh_DATA) virtualhosts.default.xml $(configdir)/virtualhosts.default.xml



commit b9c635f390604b98846c410e95eed74f887b3feb
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 22 14:57:28 2010 +0100

    Add the noinst_ prefix to the test_suite program.

diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 70c8af0..3503dcb 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -15,9 +15,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
-bin_PROGRAMS = test_suite
+noinst_PROGRAMS = test_suite
 test_suite_SOURCES =  	main.cpp				\
-			memory_socket.h			\
+			memory_socket.h			        \
 			test_auth_domain.cpp			\
 			test_auth_method.cpp			\
 			test_base64.cpp				\
@@ -35,7 +35,7 @@ test_suite_SOURCES =  	main.cpp				\
 			test_filter_chain.cpp			\
 			test_fork_server.cpp			\
 			test_ftp.cpp				\
-			test_gopher_content.cpp				\
+			test_gopher_content.cpp			\
 			test_gzip.cpp				\
 			test_hashmap.cpp			\
 			test_homedir.cpp			\

-----------------------------------------------------------------------

Summary of changes:
 myserver/binaries/Makefile.am                     |    6 +-
 myserver/include/base/string/stringutils.h        |    7 -
 myserver/include/protocol/http/http_header.h      |   35 +++-
 myserver/include/protocol/http/http_request.h     |   29 --
 myserver/include/protocol/http/http_response.h    |   26 --
 myserver/src/base/base64/mime_utils.cpp           |   14 +-
 myserver/src/base/string/stringutils.cpp          |   10 -
 myserver/src/http_handler/http_dir/http_dir.cpp   |    4 +-
 myserver/src/http_handler/http_file/http_file.cpp |   32 ++--
 myserver/src/http_handler/isapi/isapi.cpp         |   40 ++--
 myserver/src/http_handler/wincgi/wincgi.cpp       |   10 +-
 myserver/src/protocol/http/Makefile.am            |    7 +-
 myserver/src/protocol/http/env/env.cpp            |    2 +-
 myserver/src/protocol/http/http.cpp               |   34 ++--
 myserver/src/protocol/http/http_data_handler.cpp  |    4 +-
 myserver/src/protocol/http/http_data_read.cpp     |    8 +-
 myserver/src/protocol/http/http_header.cpp        |   70 +++++
 myserver/src/protocol/http/http_headers.cpp       |   19 +-
 myserver/src/protocol/http/http_request.cpp       |  289 ++++++++++-----------
 myserver/src/protocol/http/http_response.cpp      |   27 +--
 myserver/tests/Makefile.am                        |    6 +-
 myserver/tests/test_http_req_security_domain.cpp  |    1 +
 myserver/tests/test_http_request.cpp              |    2 +
 23 files changed, 340 insertions(+), 342 deletions(-)
 create mode 100644 myserver/src/protocol/http/http_header.cpp


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Feb 22 11:11:14 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NjasM-0000xz-Ex
	for mharc-myserver-commit@gnu.org; Mon, 22 Feb 2010 11:11:14 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NjasL-0000xu-Fd
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:11:13 -0500
Received: from [140.186.70.92] (port=56091 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NjasI-0000wf-3v
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:11:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1NjasG-0008Pq-Qe
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:11:10 -0500
Received: from proliant.st.ewi.tudelft.nl ([130.161.158.3]:39979)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1NjasG-0008Pd-3b
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:11:08 -0500
Received: from hydra (buildfarm.st.ewi.tudelft.nl [130.161.158.181])
	by proliant.st.ewi.tudelft.nl (8.12.11/8.12.8) with SMTP id
	o1MGB6C0023733
	for <myserver-commit@gnu.org>; Mon, 22 Feb 2010 17:11:06 +0100
Message-Id: <201002221611.o1MGB6C0023733@proliant.st.ewi.tudelft.nl>
Received: by hydra (sSMTP sendmail emulation); Mon, 22 Feb 2010 17:11:06 +0100
To: myserver-commit@gnu.org
From: Hydra Build Daemon <e.dolstra@tudelft.nl>
Date: Mon, 22 Feb 2010 17:11:06 +0100
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
Subject: [myserver-commit] Hydra job gnu:myserver-master:tarball build
	300992 FAILED
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Feb 2010 16:11:13 -0000

Hi,

This is to let you know that Hydra build 300992 of job gnu:myserver-master:tarball has changed from SUCCEEDED to FAILED.

Complete build information can be found on this page: http://hydra.nixos.org/build/300992

The last 50 lines of the build log are shown at the bottom of this email.

A summary of the build information follows:

Build ID:              | 300992
Nix name:              | myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925
Short description:     | Build of a source distribution from a checkout
Maintainer(s):         | myserver-commit@gnu.org
System:                | x86_64-linux
Derivation store path: | /nix/store/v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv
Output store path:     | /nix/store/wi973hf5r38rb6ihiy8alr3mb85dhsdv-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925
Time added:            | 2010-02-22 17:11:05
Build started:         | 2010-02-22 17:07:41
Build finished:        | 2010-02-22 17:11:05
Duration:              | 204s

The build inputs were:

Name        | Type | Value
------------+------+---------------------------------------------------------------------------
myserverSrc | git  | git://git.sv.gnu.org/myserver.git:95371abb2377a4c70503531d45a548dc0a678925
hydraConfig | svn  | https://svn.nixos.org/repos/nix/hydra-config/gnu/trunk:20071
nixpkgs     | svn  | https://svn.nixos.org/repos/nix/nixpkgs/trunk:20166

Regards,

The Hydra build daemon.

---
  AR     libgopher.a
[qmake[4]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/gopher'
[qMaking all in http
[pmake[4]: Entering directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http'
[pbuilding all-recursive
Making all in env
[pmake[5]: Entering directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http/env'
[pbuilding all-recursive
[pmake[6]: Entering directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http/env'
[pbuilding env.o
  CXX    env.o
[3s[ag++ -DHAVE_CONFIG_H -I. -I../../../..   -I/nix/store/3l4iggpn70brxyk4pkfpfgcsavlxwjl5-libxml2-2.7.6/include/libxml2 "-I../../../../lib" -fPIC -DPIC  -c -o env.o env.cpp[b
[q[pbuilding libenv.a
  AR     libenv.a
[qmake[6]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http/env'
[q[qmake[5]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http/env'
[q[pmake[5]: Entering directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http'
[pbuilding http.o
  CXX    http.o
[3s[ag++ -DHAVE_CONFIG_H -I. -I../../..   -I/nix/store/3l4iggpn70brxyk4pkfpfgcsavlxwjl5-libxml2-2.7.6/include/libxml2 "-I../../../lib" -fPIC -DPIC  -c -o http.o http.cpp[b
[q[pbuilding http_data_handler.o
  CXX    http_data_handler.o
[3s[ag++ -DHAVE_CONFIG_H -I. -I../../..   -I/nix/store/3l4iggpn70brxyk4pkfpfgcsavlxwjl5-libxml2-2.7.6/include/libxml2 "-I../../../lib" -fPIC -DPIC  -c -o http_data_handler.o http_data_handler.cpp[b
[q[pbuilding http_data_read.o
  CXX    http_data_read.o
[3s[ag++ -DHAVE_CONFIG_H -I. -I../../..   -I/nix/store/3l4iggpn70brxyk4pkfpfgcsavlxwjl5-libxml2-2.7.6/include/libxml2 "-I../../../lib" -fPIC -DPIC  -c -o http_data_read.o http_data_read.cpp[b
[q[pbuilding http_errors.o
  CXX    http_errors.o
[3s[ag++ -DHAVE_CONFIG_H -I. -I../../..   -I/nix/store/3l4iggpn70brxyk4pkfpfgcsavlxwjl5-libxml2-2.7.6/include/libxml2 "-I../../../lib" -fPIC -DPIC  -c -o http_errors.o http_errors.cpp[b
[q[pbuilding http_header.o
  CXX    http_header.o
[3s[ag++ -DHAVE_CONFIG_H -I. -I../../..   -I/nix/store/3l4iggpn70brxyk4pkfpfgcsavlxwjl5-libxml2-2.7.6/include/libxml2 "-I../../../lib" -fPIC -DPIC  -c -o http_header.o http_header.cpp[b
http_header.cpp: In member function 'virtual std::string* HttpHeader::getValue(const char*, std::string*)':
http_header.cpp:34: error: 'str' was not declared in this scope
make[5]: *** [http_header.o] Error 1
make[5]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http'
[q[qmake[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol/http'
[q[qmake[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src/protocol'
[q[qmake[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver/src'
[q[qmake[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/nix-build-v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv-0/git-export/myserver'
[q[qmake: *** [all] Error 2
[q[q[qbuild time elapsed:  0m0.024s 0m0.011s 1m33.769s 0m35.979s
builder for `/nix/store/v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv' failed with exit code 2
error: build of `/nix/store/v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv' failed
Shared connection to stan closed.

build of `/nix/store/v8kv620gknjn0cp047k45zzd6c5qzgai-myserver-tarball-0pre95371abb2377a4c70503531d45a548dc0a678925.drv' on `buildfarm@stan' failed with exit code 256



From MAILER-DAEMON Mon Feb 22 11:21:33 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Njb2K-0005mR-UM
	for mharc-myserver-commit@gnu.org; Mon, 22 Feb 2010 11:21:32 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Njb2J-0005lY-ND
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:21:31 -0500
Received: from [140.186.70.92] (port=59757 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Njb2I-0005kW-P4
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:21:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njb2I-0001LP-6w
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:21:30 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:48313
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njb2I-0001LK-3K
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 11:21:30 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njb2I-0002jW-1w
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 16:21:30 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Njb2H-0002Uw-R5
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 16:21:29 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 95371abb2377a4c70503531d45a548dc0a678925
X-Git-Newrev: 6d146ec8613b6c9c847fb14bab0687d65862e943
Message-Id: <E1Njb2H-0002Uw-R5@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 22 Feb 2010 16:21:29 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-26-g6d146ec
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Feb 2010 16:21:32 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6d146ec8613b6c9c847fb14bab0687d65862e943 (commit)
      from  95371abb2377a4c70503531d45a548dc0a678925 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6d146ec8613b6c9c847fb14bab0687d65862e943
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Feb 22 17:20:58 2010 +0100

    Fix a build error
    
    Bug introduced by: 95371abb2377a4c70503531d45a548dc0a678925

diff --git a/myserver/src/protocol/http/http_header.cpp b/myserver/src/protocol/http/http_header.cpp
index 791a37d..c231478 100644
--- a/myserver/src/protocol/http/http_header.cpp
+++ b/myserver/src/protocol/http/http_header.cpp
@@ -31,9 +31,9 @@ using namespace std;
 string* HttpHeader::getValue (const char *name, string *out)
 {
   string key (name);
-  transform (key.begin (), str.end (), str.begin (), ::tolower);
+  transform (key.begin (), key.end (), key.begin (), ::tolower);
 
-  Entry *e = other.get (str);
+  Entry *e = other.get (key);
   if (e)
     {
       if (out)

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/protocol/http/http_header.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Feb 22 12:12:41 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Njbpo-00034w-Tm
	for mharc-myserver-commit@gnu.org; Mon, 22 Feb 2010 12:12:40 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Njbpo-00034K-5z
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 12:12:40 -0500
Received: from [140.186.70.92] (port=49192 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Njbpg-0002to-1I
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 12:12:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1NjbpU-0007le-P5
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 12:12:30 -0500
Received: from proliant.st.ewi.tudelft.nl ([130.161.158.3]:39989)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <e.dolstra@tudelft.nl>) id 1NjbpU-0007lZ-Hg
	for myserver-commit@gnu.org; Mon, 22 Feb 2010 12:12:20 -0500
Received: from hydra (buildfarm.st.ewi.tudelft.nl [130.161.158.181])
	by proliant.st.ewi.tudelft.nl (8.12.11/8.12.8) with SMTP id
	o1MHCIM0024484
	for <myserver-commit@gnu.org>; Mon, 22 Feb 2010 18:12:18 +0100
Message-Id: <201002221712.o1MHCIM0024484@proliant.st.ewi.tudelft.nl>
Received: by hydra (sSMTP sendmail emulation); Mon, 22 Feb 2010 18:12:18 +0100
To: myserver-commit@gnu.org
From: Hydra Build Daemon <e.dolstra@tudelft.nl>
Date: Mon, 22 Feb 2010 18:12:18 +0100
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
Subject: [myserver-commit] Hydra job gnu:myserver-master:tarball build
	301005 SUCCEEDED
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Feb 2010 17:12:40 -0000

Hi,

This is to let you know that Hydra build 301005 of job gnu:myserver-master:tarball has changed from FAILED to SUCCEEDED.

Complete build information can be found on this page: http://hydra.nixos.org/build/301005

A summary of the build information follows:

Build ID:              | 301005
Nix name:              | myserver-tarball-0pre6d146ec8613b6c9c847fb14bab0687d65862e943
Short description:     | Build of a source distribution from a checkout
Maintainer(s):         | myserver-commit@gnu.org
System:                | x86_64-linux
Derivation store path: | /nix/store/fi3g1ax43ya56am84gr0h0y9hqfpfdyx-myserver-tarball-0pre6d146ec8613b6c9c847fb14bab0687d65862e943.drv
Output store path:     | /nix/store/a7rvhb94zvfxiyyx1f9ckar7jkp4ax5r-myserver-tarball-0pre6d146ec8613b6c9c847fb14bab0687d65862e943
Time added:            | 2010-02-22 18:12:18
Build started:         | 2010-02-22 18:09:05
Build finished:        | 2010-02-22 18:12:18
Duration:              | 193s

The build inputs were:

Name        | Type | Value
------------+------+---------------------------------------------------------------------------
myserverSrc | git  | git://git.sv.gnu.org/myserver.git:6d146ec8613b6c9c847fb14bab0687d65862e943
hydraConfig | svn  | https://svn.nixos.org/repos/nix/hydra-config/gnu/trunk:20071
nixpkgs     | svn  | https://svn.nixos.org/repos/nix/nixpkgs/trunk:20166

Regards,

The Hydra build daemon.



From MAILER-DAEMON Tue Feb 23 07:06:35 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NjtX9-0004Qp-Li
	for mharc-myserver-commit@gnu.org; Tue, 23 Feb 2010 07:06:35 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NjtX7-0004PS-4e
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 07:06:33 -0500
Received: from [140.186.70.92] (port=39650 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NjtX5-0004Oc-56
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 07:06:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NjtX3-0001uh-Q9
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 07:06:31 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:59875
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NjtX3-0001ua-Kw
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 07:06:29 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NjtX2-0008TW-VT
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 12:06:29 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NjtX2-0004J0-CU
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 12:06:28 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6d146ec8613b6c9c847fb14bab0687d65862e943
X-Git-Newrev: ed65943af58579a421e31d6645e3a33d08031d20
Message-Id: <E1NjtX2-0004J0-CU@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 23 Feb 2010 12:06:28 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-27-ged65943
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Feb 2010 12:06:33 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  ed65943af58579a421e31d6645e3a33d08031d20 (commit)
      from  6d146ec8613b6c9c847fb14bab0687d65862e943 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit ed65943af58579a421e31d6645e3a33d08031d20
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 13:06:10 2010 +0100

    The plugins manager can load plugins before the server startup.

diff --git a/myserver/include/plugin/plugin_info.h b/myserver/include/plugin/plugin_info.h
index 56991f2..79eefb7 100644
--- a/myserver/include/plugin/plugin_info.h
+++ b/myserver/include/plugin/plugin_info.h
@@ -61,7 +61,7 @@ public:
   void setEnabled (bool enabled);
   pair<int,int>* getDependence (string name);
 
-  static int convertVersion (string* s);
+  static int convertVersion (const string& s);
 
 private:
   string name;
diff --git a/myserver/include/plugin/plugins_manager.h b/myserver/include/plugin/plugins_manager.h
index 67ad458..c74569d 100644
--- a/myserver/include/plugin/plugins_manager.h
+++ b/myserver/include/plugin/plugins_manager.h
@@ -46,14 +46,16 @@ public:
     return pluginsInfos.end ();
   }
 
-  Plugin* getPlugin (string& name);
+  Plugin* getPlugin (string &name);
 
-  int preLoad (Server *server, string& resource);
+  int preLoad (Server *server, string &resource);
   int load (Server *server);
   int postLoad (Server *server);
   int unLoad ();
 
-  virtual void removePlugin (string& name);
+  int quickLoad (Server *server, const string &plugins);
+
+  virtual void removePlugin (string &name);
 
   virtual int addPluginInfo (string&, PluginInfo*);
   virtual PluginInfo* getPluginInfo (string&);
@@ -63,13 +65,16 @@ public:
   PluginsManager ();
   ~PluginsManager ();
 
-private:
+protected:
+  virtual int loadFile (Server* server, string &name, string &file, PluginInfo* pinfo);
   HashMap<string, PluginInfo*> pluginsInfos;
   int loadOptions (Server *server);
-  void recursiveDependencesFallDown (Server* server, string &name, HashMap<string, bool> &remove, HashMap<string, list<string>*> &dependsOn);
-  Plugin* preLoadPlugin (string& file, Server* server, bool global);
+  void recursiveDependencesFallDown (Server* server, string &name,
+                                     HashMap<string, bool> &remove,
+                                     HashMap<string, list<string>*> &dependsOn);
+  virtual Plugin* preLoadPlugin (string &file, Server* server, bool global);
 
-  PluginInfo* loadInfo (Server* server, string& name, string& path);
+  virtual PluginInfo* loadInfo (Server* server, string &name, string &path);
 };
 
 #endif
diff --git a/myserver/src/plugin/plugin_info.cpp b/myserver/src/plugin/plugin_info.cpp
index 53ee7e4..fd7a6b1 100644
--- a/myserver/src/plugin/plugin_info.cpp
+++ b/myserver/src/plugin/plugin_info.cpp
@@ -39,9 +39,6 @@ PluginInfo::PluginInfo (string& name, bool enabled, bool global)
   this->plugin = NULL;
 }
 
-
-
-
 /*!
  *Destroy the object.
  */
@@ -75,7 +72,7 @@ bool PluginInfo::isGlobal ()
  */
 void PluginInfo::addDependence (string name, int minVersion, int maxVersion)
 {
-  dependences.put (name, new pair<int,int>(minVersion,maxVersion));
+  dependences.put (name, new pair<int, int> (minVersion, maxVersion));
 }
 
 /*!
@@ -188,9 +185,9 @@ Plugin* PluginInfo::removePlugin ()
 
 /*!
  * Converts a string in the format "a.b.c.d" in an int in the format abcd where
- * each number takes 8 bit.
+ * each number takes 8 bits.
  */
-int PluginInfo::convertVersion (string* s)
+int PluginInfo::convertVersion (const string & s)
 {
   int ret;
 
@@ -198,54 +195,51 @@ int PluginInfo::convertVersion (string* s)
     regex = new Regex ("^[1-2]?[1-9]?[0-9](\\.[1-2]?[0-9]?[0-9](\\.[1-2]?[0-9]?[0-9](\\.[1-2]?[0-9]?[0-9])?)?)?$",
                        REG_EXTENDED | REG_NOSUB);
 
-  ret = regex->exec (s->c_str (), 0, NULL, 0);
+  ret = regex->exec (s.c_str (), 0, NULL, 0);
 
   if (ret)
     return -1;
 
-  string::size_type pos = s->find (".",0);
+  string::size_type pos = s.find (".", 0);
   if (pos == string::npos)
-    return atoi (s->c_str ())  <<  24;
+    return atoi (s.c_str ())  <<  24;
 
   int n1 = 0;
   int n2 = 0;
   int n3 = 0;
   int n4 = 0;
 
-  string sa = s->substr (0, pos);
+  string sa = s.substr (0, pos);
   n1 = atoi (sa.c_str ());
   if (n1>255)
     return -1;
 
   string::size_type oldpos = pos;
 
-
-  if (oldpos!=string::npos)
+  if (oldpos != string::npos)
     {
-      pos = s->find (".",oldpos + 1);
-      string sa = s->substr (oldpos + 1, pos - oldpos);
+      pos = s.find (".", oldpos + 1);
+      string sa = s.substr (oldpos + 1, pos - oldpos);
       n2 = atoi (sa.c_str ());
-      if (n2>255)
+      if (n2 > 255)
         return -1;
     }
 
-
   oldpos = pos;
-  if (oldpos!=string::npos)
+  if (oldpos != string::npos)
     {
-      pos = s->find (".",oldpos + 1);
-      string sa = s->substr (oldpos + 1, pos - oldpos);
+      pos = s.find (".",oldpos + 1);
+      string sa = s.substr (oldpos + 1, pos - oldpos);
       n3 = atoi (sa.c_str ());
-      if (n3>255)
+      if (n3 > 255)
         return -1;
     }
 
-
   oldpos = pos;
   if (oldpos != string::npos)
     {
-      pos = s->find (".",oldpos + 1);
-      string sa = s->substr (oldpos + 1, pos - oldpos);
+      pos = s.find (".",oldpos + 1);
+      string sa = s.substr (oldpos + 1, pos - oldpos);
       n4 = atoi (sa.c_str ());
       if (n4 > 255)
         return -1;
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 6988c41..9cdd8e5 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -51,7 +51,7 @@ PluginsManager::~PluginsManager () { }
  * \param name The plugin name.
  */
 Plugin*
-PluginsManager::getPlugin (string& name)
+PluginsManager::getPlugin (string &name)
 {
   PluginInfo* info = pluginsInfos.get (name);
   if (info)
@@ -126,7 +126,7 @@ PluginsManager::loadOptions (Server *server)
  * implementation it is a directory name.
  */
 int
-PluginsManager::preLoad (Server* server, string& resource)
+PluginsManager::preLoad (Server* server, string &resource)
 {
   ReadDirectory fdir;
   ReadDirectory flib;
@@ -168,7 +168,6 @@ PluginsManager::preLoad (Server* server, string& resource)
           if (flib.name[0] == '.')
             continue;
 
-
           if (!strstr (flib.name.c_str (), "plugin.xml"))
             continue;
           completeFileName.assign (filename);
@@ -203,31 +202,50 @@ PluginsManager::preLoad (Server* server, string& resource)
 #else
           libname.append (".so");
 #endif
-          if (pinfo->isEnabled ())
-            {
-              Plugin* plugin = preLoadPlugin (libname, server,
-                                              pinfo->isGlobal ());
-              if (plugin)
-                pinfo->setPlugin (plugin);
-              else
-                {
-                  ret |= 1;
-                  server->log (MYSERVER_LOG_MSG_ERROR,
-                              _("Error loading plugin `%s'"), libname.c_str ());
-                }
-            }
-          addPluginInfo (pname, pinfo);
+
+          ret |= loadFile (server, pname, libname, pinfo);
         }
-      while (!flib.findnext ());
+      while (! flib.findnext ());
     }
-  while (!fdir.findnext ());
+  while (! fdir.findnext ());
+
   fdir.findclose ();
   flib.findclose ();
   return ret;
 }
 
 /*!
- *Create the appropriate object to keep a plugin.
+ * Load the specified plugin file.
+ * \param server The server object to use.
+ * \param name Plugin name.
+ * \param file Plugin file.
+ * \param pinfo Plugin information.
+ */
+int
+PluginsManager::loadFile (Server* server, string &name, string &file,
+                          PluginInfo* pinfo)
+{
+  int ret = 0;
+  if (pinfo->isEnabled ())
+    {
+      Plugin* plugin = preLoadPlugin (file, server,
+                                      pinfo->isGlobal ());
+      if (plugin)
+        pinfo->setPlugin (plugin);
+      else
+        {
+          ret = 1;
+          server->log (MYSERVER_LOG_MSG_ERROR,
+                       _("Error loading plugin `%s'"), file.c_str ());
+        }
+    }
+
+  addPluginInfo (name, pinfo);
+  return ret;
+}
+
+/*!
+ * Create the appropriate object to keep a plugin.
  */
 Plugin*
 PluginsManager::createPluginObject ()
@@ -236,12 +254,70 @@ PluginsManager::createPluginObject ()
 }
 
 /*!
+ * Quick load a plugin, doing all phases {pre,,post}Load.
+ * \param server The server object to use.
+ * \param plugins comma separed list of plugins to load as:
+ * "name1:pluginfile1.so,name2:pluginfile2.so"
+*/
+int
+PluginsManager::quickLoad (Server *server, const string &plugins)
+{
+  size_t start = 0;
+  int ret = 0;
+  while (1)
+    {
+      size_t commaPos = plugins.find (",", start);
+
+      size_t sep = plugins.find (":", start);
+      if (sep > commaPos || sep == string::npos)
+        {
+          server->log (MYSERVER_LOG_MSG_ERROR,
+                       _("Invalid plugins data specified"));
+          return -1;
+        }
+
+      string name = plugins.substr (start, sep - start);
+      string file = plugins.substr (sep + 1, commaPos == string::npos
+                                    ? string::npos
+                                    : commaPos - sep - 1);
+
+      PluginInfo *pinfo = new PluginInfo (name);
+      auto_ptr<PluginInfo> pinfoAutoPtr (pinfo);
+
+      ret |= loadFile (server, name, file, pinfo);
+
+      pinfoAutoPtr.release ();
+
+      Plugin *plugin = preLoadPlugin (file, server, true);
+      if (! plugin)
+        {
+          server->log (MYSERVER_LOG_MSG_ERROR,
+                       _("Cannot load plugin %s"), file.c_str ());
+          return -1;
+        }
+
+      pinfo->setPlugin (plugin);
+      addPluginInfo (name, pinfo);
+
+      ret |= plugin->load (server);
+      ret |= plugin->postLoad (server);
+
+      if (commaPos == string::npos)
+        break;
+
+      start = commaPos + 1;
+    }
+
+  return ret;
+}
+
+/*!
  *Loads the plugin info.
  *\param name The plugin name.
  *\param path the plugin xml descriptor path.
  */
 PluginInfo*
-PluginsManager::loadInfo (Server* server, string& name, string& path)
+PluginsManager::loadInfo (Server* server, string &name, string &path)
 {
   PluginInfo* pinfo = getPluginInfo (name);
   auto_ptr<PluginInfo> pinfoAutoPtr (NULL);
@@ -277,8 +353,8 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
       xmlChar *minVersion = xmlGetProp (nodes->nodeTab[0],
                                         (const xmlChar*) "min-version");
 
-      string sMinVer ((char*)minVersion);
-      pinfo->setMyServerMinVersion (PluginInfo::convertVersion (&sMinVer));
+      string sMinVer ((char*) minVersion);
+      pinfo->setMyServerMinVersion (PluginInfo::convertVersion (sMinVer));
     }
   else
     {
@@ -294,7 +370,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
                                         (const xmlChar*) "max-version");
 
       string sMaxVer ((char*)maxVersion);
-      pinfo->setMyServerMaxVersion (PluginInfo::convertVersion (&sMaxVer));
+      pinfo->setMyServerMaxVersion (PluginInfo::convertVersion (sMaxVer));
     }
   else
     {
@@ -335,7 +411,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     }
 
   string verStr ((char*) nodes->nodeTab[0]->content);
-  int version = PluginInfo::convertVersion (&verStr);
+  int version = PluginInfo::convertVersion (verStr);
 
   if (version != -1)
     pinfo->setVersion (version);
@@ -372,8 +448,8 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
       string maxVerStr = ((char*) xmlGetProp (nodes->nodeTab[i],
                                               (const xmlChar*) "max-version"));
 
-      int minVersion = PluginInfo::convertVersion (&minVerStr);
-      int maxVersion = PluginInfo::convertVersion (&maxVerStr);
+      int minVersion = PluginInfo::convertVersion (minVerStr);
+      int maxVersion = PluginInfo::convertVersion (maxVerStr);
 
       if (minVersion == -1 || maxVersion == -1)
         {
@@ -398,7 +474,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
  * \param global Specify if the library should be loaded globally.
  */
 Plugin*
-PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
+PluginsManager::preLoadPlugin (string &file, Server* server, bool global)
 {
   Plugin *plugin = createPluginObject ();
 
@@ -459,8 +535,6 @@ PluginsManager::recursiveDependencesFallDown (Server* server, string &name,
 int
 PluginsManager::load (Server *server)
 {
-
-
   list<string*> toRemove;
   HashMap<string, list<string>*> dependsOn;
   HashMap<string, PluginInfo*>::Iterator it = pluginsInfos.begin ();
@@ -476,7 +550,7 @@ PluginsManager::load (Server *server)
       if (i != string::npos)
         msversion = msversion.substr (0, i);
 
-      int msVersion = PluginInfo::convertVersion (&msversion);
+      int msVersion = PluginInfo::convertVersion (msversion);
       if (msVersion < pinfo->getMyServerMinVersion ()
           || msVersion > pinfo->getMyServerMaxVersion ())
         server->log (MYSERVER_LOG_MSG_WARNING,
@@ -499,7 +573,6 @@ PluginsManager::load (Server *server)
           deps->push_front (name);
         }
 
-
       it++;
     }
 
@@ -508,8 +581,6 @@ PluginsManager::load (Server *server)
     removePlugin (**tRIt);
   toRemove.clear ();
 
-
-
   HashMap<string, list<string>*>::Iterator dIt = dependsOn.begin ();
   for (; dIt != dependsOn.end (); dIt++)
     {
@@ -621,7 +692,7 @@ PluginsManager::unLoad ()
  * \param name The plugin to remove.
  */
 void
-PluginsManager::removePlugin (string& name)
+PluginsManager::removePlugin (string &name)
 {
   PluginInfo* info = pluginsInfos.remove (name);
 
@@ -634,7 +705,7 @@ PluginsManager::removePlugin (string& name)
  * \param pi The options for the plugin.
  */
 int
-PluginsManager::addPluginInfo (string& plugin, PluginInfo* pi)
+PluginsManager::addPluginInfo (string &plugin, PluginInfo* pi)
 {
   PluginInfo* oldPi = pluginsInfos.put (plugin, pi);
 
@@ -649,7 +720,7 @@ PluginsManager::addPluginInfo (string& plugin, PluginInfo* pi)
  * \param plugin The plugin name.
  */
 PluginInfo*
-PluginsManager::getPluginInfo (string& plugin)
+PluginsManager::getPluginInfo (string &plugin)
 {
   return pluginsInfos.get (plugin);
 }
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 3503dcb..069bd32 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -56,6 +56,7 @@ test_suite_SOURCES =  	main.cpp				\
 			test_nodetree.cpp			\
 			test_pipe.cpp				\
 			test_plugin_info.cpp			\
+			test_plugins_manager.cpp		\
 			test_read_directory.cpp			\
 			test_recursive_mutex.cpp		\
 			test_regex.cpp				\
diff --git a/myserver/tests/test_plugin_info.cpp b/myserver/tests/test_plugin_info.cpp
index 203d4ae..b3334a5 100644
--- a/myserver/tests/test_plugin_info.cpp
+++ b/myserver/tests/test_plugin_info.cpp
@@ -1,19 +1,19 @@
 /*
- MyServer
- Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
+  MyServer
+  Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 #include "myserver.h"
 #include <ctype.h>
@@ -49,121 +49,119 @@ private:
 public:
   void setUp ()
   {
-  	string name ("test");
-	pluginfo = new PluginInfo (name,false,false);
+    string name ("test");
+    pluginfo = new PluginInfo (name, false, false);
   }
 
   void tearDown ()
   {
-	delete (pluginfo);
+    delete (pluginfo);
   }
 
   void testIsNotEnabled ()
   {
-  	CPPUNIT_ASSERT (!pluginfo->isEnabled ());
+    CPPUNIT_ASSERT (! pluginfo->isEnabled ());
   }
 
   void testIsEnabled ()
   {
-  	delete (pluginfo);
-  	string name ("test");
-  	pluginfo = new PluginInfo (name,true,false);
-  	CPPUNIT_ASSERT (pluginfo->isEnabled ());
+    delete (pluginfo);
+    string name ("test");
+    pluginfo = new PluginInfo (name, true, false);
+    CPPUNIT_ASSERT (pluginfo->isEnabled ());
   }
 
   void testIsNotGlobal ()
   {
-  	CPPUNIT_ASSERT (!pluginfo->isGlobal ());
+    CPPUNIT_ASSERT (! pluginfo->isGlobal ());
   }
 
   void testIsGlobal ()
   {
-  	delete (pluginfo);
-  	string name ("test");
-  	pluginfo = new PluginInfo (name,false,true);
-  	CPPUNIT_ASSERT (pluginfo->isGlobal ());
+    delete (pluginfo);
+    string name ("test");
+    pluginfo = new PluginInfo (name, false, true);
+    CPPUNIT_ASSERT (pluginfo->isGlobal ());
   }
 
   void testGetVersion ()
   {
-  	CPPUNIT_ASSERT_EQUAL (pluginfo->getVersion (),0);
+    CPPUNIT_ASSERT_EQUAL (pluginfo->getVersion (), 0);
   }
 
   void testGetMyServerMinVersion ()
   {
-  	CPPUNIT_ASSERT_EQUAL (pluginfo->getMyServerMinVersion (),0);
+    CPPUNIT_ASSERT_EQUAL (pluginfo->getMyServerMinVersion (), 0);
   }
 
   void testGetMyServerMaxVersion ()
   {
-  	CPPUNIT_ASSERT_EQUAL (pluginfo->getMyServerMaxVersion (),0);
+    CPPUNIT_ASSERT_EQUAL (pluginfo->getMyServerMaxVersion (), 0);
   }
 
   void testGetName ()
   {
-  	CPPUNIT_ASSERT_EQUAL (pluginfo->getName ().compare ("test"),0);
+    CPPUNIT_ASSERT_EQUAL (pluginfo->getName ().compare ("test"), 0);
   }
 
   void testDependencies ()
   {
-  	string test ("test-dep");
-  	pluginfo->addDependence (test ,0,1);
-  	CPPUNIT_ASSERT_EQUAL ( (*(pluginfo->begin ()))->first , 0);
-  	CPPUNIT_ASSERT_EQUAL ( (*(pluginfo->begin ()))->second , 1);
-  	CPPUNIT_ASSERT_EQUAL ( pluginfo->begin ().getKey ().compare ("test-dep"),0);
+    string test ("test-dep");
+    pluginfo->addDependence (test ,0,1);
+    CPPUNIT_ASSERT_EQUAL ((*(pluginfo->begin ()))->first , 0);
+    CPPUNIT_ASSERT_EQUAL ((*(pluginfo->begin ()))->second , 1);
+    CPPUNIT_ASSERT_EQUAL (pluginfo->begin ().getKey ().compare ("test-dep"), 0);
   }
 
-
-
   void testVersionConversionStringInt ()
   {
-  	int v = PluginInfo::convertVersion (new string ("1"));
-  	CPPUNIT_ASSERT_EQUAL (1<<24,v);
+    int v = PluginInfo::convertVersion ("1");
+    CPPUNIT_ASSERT_EQUAL (1 << 24,v);
 
-  	v = PluginInfo::convertVersion (new string ("255"));
-  	CPPUNIT_ASSERT_EQUAL (255<<24,v);
+    v = PluginInfo::convertVersion ("255");
+    CPPUNIT_ASSERT_EQUAL (255 << 24,v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2"));
-  	CPPUNIT_ASSERT_EQUAL ((1<<24) + (2<<16),v);
+    v = PluginInfo::convertVersion ("1.2");
+    CPPUNIT_ASSERT_EQUAL ((1 << 24) + (2 << 16),v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2.3"));
-  	CPPUNIT_ASSERT_EQUAL ((1<<24) + (2<<16) + (3<<8),v);
+    v = PluginInfo::convertVersion ("1.2.3");
+    CPPUNIT_ASSERT_EQUAL ((1 << 24) + (2 << 16) + (3 << 8),v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2.3.4"));
-  	CPPUNIT_ASSERT_EQUAL ((1<<24) + (2<<16) + (3<<8) + 4,v);
+    v = PluginInfo::convertVersion ("1.2.3.4");
+    CPPUNIT_ASSERT_EQUAL ((1 << 24) + (2 << 16) + (3 << 8) + 4, v);
 
-  	v = PluginInfo::convertVersion (new string ("1."));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2."));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.2.");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2.3."));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.2.3.");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2.3.4."));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.2.3.4.");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2.3.4...."));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.2.3.4....");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("......1.2.3.4"));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("......1.2.3.4");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1..2.3.4"));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1..2.3.4");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2...3.4"));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.2...3.4");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.2.3....4"));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.2.3....4");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.300.3.4"));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.300.3.4");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
 
-  	v = PluginInfo::convertVersion (new string ("1.3.299.4"));
-  	CPPUNIT_ASSERT_EQUAL (-1,v);
+    v = PluginInfo::convertVersion ("1.3.299.4");
+    CPPUNIT_ASSERT_EQUAL (-1, v);
   }
 };
 
diff --git a/myserver/tests/test_plugins_manager.cpp b/myserver/tests/test_plugins_manager.cpp
new file mode 100644
index 0000000..c2bb5d8
--- /dev/null
+++ b/myserver/tests/test_plugins_manager.cpp
@@ -0,0 +1,139 @@
+/*
+  MyServer
+  Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "myserver.h"
+#include <ctype.h>
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <include/plugin/plugins_manager.h>
+#include <include/server/server.h>
+#include <include/plugin/plugin_info.h>
+
+#include <string.h>
+
+#include <list>
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+class MockPlugin : public Plugin
+{
+public:
+  virtual int load (Server* server)
+  {
+    return 0;
+  }
+
+  virtual int preLoad (string& file, bool global)
+  {
+    return 0;
+  }
+
+  virtual int postLoad (Server* server)
+  {
+    return 0;
+  }
+
+  virtual int unLoad ()
+  {
+    return 0;
+  }
+
+  virtual const char* getName (char* buffer, u_long len)
+  {
+    return 0;
+  }
+
+  virtual void* getDirectMethod (char* name)
+  {
+    return 0;
+  }
+
+};
+
+class MockPluginsManager : public PluginsManager
+{
+public:
+  vector<string> names;
+  vector<string> files;
+  vector<PluginInfo*> pinfos;
+  void clear ()
+  {
+    names.clear ();
+    files.clear ();
+    pinfos.clear ();
+  }
+
+protected:
+  virtual int loadFile (Server* server, string &name, string &file,
+                        PluginInfo* pinfo)
+  {
+    names.push_back (name);
+    files.push_back (file);
+    pinfos.push_back (pinfo);
+    return 0;
+  }
+
+  virtual Plugin* preLoadPlugin (string &file, Server* server, bool global)
+  {
+    new MockPlugin ();
+  }
+};
+
+class TestPluginsManager : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE (TestPluginsManager );
+  CPPUNIT_TEST ( testQuickLoad );
+  CPPUNIT_TEST_SUITE_END ();
+private:
+  static int addPlugin (Server* server, string &name,
+                        string &file, PluginInfo* pinfo)
+  {
+
+  }
+
+public:
+  void setUp ()
+  {
+  }
+
+  void tearDown ()
+  {
+  }
+
+  void testQuickLoad ()
+  {
+    MockPluginsManager manager;
+    int ret = manager.quickLoad (Server::getInstance (),
+                                 "name1:plugin1.so,name2:plugin2.so");
+
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
+    CPPUNIT_ASSERT_EQUAL (manager.names[0].compare ("name1"), 0);
+    CPPUNIT_ASSERT_EQUAL (manager.names[1].compare ("name2"), 0);
+
+    CPPUNIT_ASSERT_EQUAL (manager.files[0].compare ("plugin1.so"), 0);
+    CPPUNIT_ASSERT_EQUAL (manager.files[1].compare ("plugin2.so"), 0);
+  }
+};
+
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestPluginsManager);

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/plugin/plugin_info.h     |    2 +-
 myserver/include/plugin/plugins_manager.h |   19 +++--
 myserver/src/plugin/plugin_info.cpp       |   40 ++++-----
 myserver/src/plugin/plugins_manager.cpp   |  145 +++++++++++++++++++++--------
 myserver/tests/Makefile.am                |    1 +
 myserver/tests/test_plugin_info.cpp       |  140 ++++++++++++++--------------
 myserver/tests/test_plugins_manager.cpp   |  139 +++++++++++++++++++++++++++
 7 files changed, 347 insertions(+), 139 deletions(-)
 create mode 100644 myserver/tests/test_plugins_manager.cpp


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 23 08:43:28 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Njv2u-0003kz-8N
	for mharc-myserver-commit@gnu.org; Tue, 23 Feb 2010 08:43:28 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Njv2s-0003kM-Kt
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 08:43:26 -0500
Received: from [140.186.70.92] (port=38859 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Njv2r-0003jR-7T
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 08:43:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njv2p-00049t-AD
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 08:43:24 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:59755
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njv2p-00049o-8D
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 08:43:23 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njv2o-0001BZ-Rg
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 13:43:22 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Njv2o-00006x-Mo
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 13:43:22 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ed65943af58579a421e31d6645e3a33d08031d20
X-Git-Newrev: 25728f32a6796809de6bb8508f25de8e3b3e2242
Message-Id: <E1Njv2o-00006x-Mo@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 23 Feb 2010 13:43:22 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-29-g25728f3
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Feb 2010 13:43:27 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  25728f32a6796809de6bb8508f25de8e3b3e2242 (commit)
       via  6f43a8b2b9e27be2f63c5613083fc43ba8d05287 (commit)
      from  ed65943af58579a421e31d6645e3a33d08031d20 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 25728f32a6796809de6bb8508f25de8e3b3e2242
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 14:38:43 2010 +0100

    Use stderr in place of stdout for warnings and errors.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 526bebc..8d0e957 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -436,7 +436,7 @@ int main (int argn, char **argv)
   if (input.logFileName
       && Server::getInstance ()->setLogLocation (input.logFileName))
     {
-      cout << "Error setting the location for the MyServer's main log" << endl;
+      cerr << "Error setting the location for the MyServer's main log" << endl;
       return 1;
     }
 
@@ -464,7 +464,7 @@ int main (int argn, char **argv)
     PluginsManager *pluginsManager = Server::getInstance ()->getPluginsManager ();
     if (pluginsManager->quickLoad (Server::getInstance (), input.plugins))
       {
-        cout << _("Cannot load specified plugins") << endl;
+        cerr << _("Cannot load specified plugins") << endl;
         return 1;
       }
   }
@@ -484,7 +484,7 @@ int main (int argn, char **argv)
       if (loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath,
                                  confFileDir))
         {
-          cout << _("Cannot find the configuration files, be sure they exist")
+          cerr << _("Cannot find the configuration files, be sure they exist")
                << endl;
           return 1;
         }
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 3290dd0..001dd16 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -94,7 +94,7 @@ void
 Server::initLogManager ()
 {
   if (!logLocation.size ())
-    logLocation.assign ("console://stdout");
+    logLocation.assign ("console://stderr");
 
   if (!logManager->containsOwner (this))
     {



commit 6f43a8b2b9e27be2f63c5613083fc43ba8d05287
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 13:20:05 2010 +0100

    Accept the argument --plugins to specify plugins loaded immediately

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index decc1a6..526bebc 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -122,6 +122,17 @@ void registerSignals ()
 
 struct argp_input
 {
+  argp_input ()
+  {
+    version = 0;
+    confFilesLocation = NULL;
+    logFileName = NULL;
+    runas = MYSERVER_RUNAS_CONSOLE;
+    pidFileName = NULL;
+    useForkServer = 0;
+    plugins = NULL;
+  }
+
   /* Print the version for MyServer?  */
   int version;
 
@@ -139,6 +150,9 @@ struct argp_input
 
   /* Specify if the fork server is used.  */
   int useForkServer;
+
+  /* Plugins to load at startup before the server starts.  */
+  const char *plugins;
 };
 
 static char doc[] = "GNU MyServer ";
@@ -146,7 +160,8 @@ static char argsDoc[] = "";
 
 enum
 {
- CONFIG_OPT = UCHAR_MAX + 1
+  CONFIG_OPT = UCHAR_MAX + 1,
+  CONFIG_PLUGINS
 };
 
 /* Use the GNU C argp parser under not windows environments.  */
@@ -166,6 +181,8 @@ static struct argp_option options[] =
      _("Specify if use a fork server")},
     {"cfgdir", CONFIG_OPT, "dir", 0,
      _("Specify an alternative directory where look for configuration files")},
+    {"plugins", CONFIG_PLUGINS, "name1:plugin1,name2:plugin2", 0,
+     _("Specify which plugins must be loaded before the server starts.")},
     {0}
   };
 
@@ -178,6 +195,10 @@ static error_t parseOpt (int key, char *arg, struct argp_state *state)
       in->version = 1;
       break;
 
+    case CONFIG_PLUGINS:
+      in->plugins = arg;
+      break;
+
     case 'r':
       if (arg)
         {
@@ -408,14 +429,6 @@ int main (int argn, char **argv)
   /* We can free path memory now.  */
   delete [] path;
 
-  /* Reset the struct.  */
-  input.version = 0;
-  input.confFilesLocation = NULL;
-  input.logFileName = NULL;
-  input.runas = MYSERVER_RUNAS_CONSOLE;
-  input.pidFileName = NULL;
-  input.useForkServer = 0;
-
   /* Call the parser.  */
   argp_parse (&myserverArgp, argn, argv, 0, 0, &input);
   runas = input.runas;
@@ -446,6 +459,16 @@ int main (int argn, char **argv)
       Process::getForkServer ()->startForkServer ();
     }
 
+  if (input.plugins)
+  {
+    PluginsManager *pluginsManager = Server::getInstance ()->getPluginsManager ();
+    if (pluginsManager->quickLoad (Server::getInstance (), input.plugins))
+      {
+        cout << _("Cannot load specified plugins") << endl;
+        return 1;
+      }
+  }
+
   /*
    * Start here the MyServer execution.
    */

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp      |   45 ++++++++++++++++++++++++++++++---------
 myserver/src/server/server.cpp |    2 +-
 2 files changed, 35 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 23 10:18:51 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NjwXD-0001Lu-8m
	for mharc-myserver-commit@gnu.org; Tue, 23 Feb 2010 10:18:51 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NjwXC-0001KQ-LV
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 10:18:50 -0500
Received: from [140.186.70.92] (port=43533 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NjwXA-0001GM-Qc
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 10:18:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NjwXA-0000Iy-Fh
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 10:18:48 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:39709
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NjwXA-0000Iu-E9
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 10:18:48 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NjwX9-0002KU-PR
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 15:18:47 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NjwX9-00053H-Io
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 15:18:47 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 25728f32a6796809de6bb8508f25de8e3b3e2242
X-Git-Newrev: 066e82ff008c457d753dc1ce1daca163171a0e12
Message-Id: <E1NjwX9-00053H-Io@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 23 Feb 2010 15:18:47 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-32-g066e82f
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Feb 2010 15:18:50 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  066e82ff008c457d753dc1ce1daca163171a0e12 (commit)
       via  bf62e96921a9cb1c388d4fab05ef569206d6316e (commit)
       via  4dc0e9aa4cd67638a98a9bd2a9f883824fa4dfe9 (commit)
      from  25728f32a6796809de6bb8508f25de8e3b3e2242 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 066e82ff008c457d753dc1ce1daca163171a0e12
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 16:18:25 2010 +0100

    Use the plugin info specified in the `plugin.xml' file.

diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 9c482ca..038c681 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -281,7 +281,13 @@ PluginsManager::quickLoad (Server *server, const string &plugins)
                                     ? string::npos
                                     : commaPos - sep - 1);
 
-      PluginInfo *pinfo = new PluginInfo (name);
+      string dir;
+      string filename;
+      FilesUtility::splitPath (file, dir, filename);
+
+      string xmlDescriptor = dir + "/plugin.xml";
+      PluginInfo *pinfo = loadInfo (server, name, xmlDescriptor);
+
       auto_ptr<PluginInfo> pinfoAutoPtr (pinfo);
 
       ret |= loadFile (server, name, file, pinfo);



commit bf62e96921a9cb1c388d4fab05ef569206d6316e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 15:20:26 2010 +0100

    Bump the plugins max-version attribute.

diff --git a/plugins/src/http_checker/plugin.xml b/plugins/src/http_checker/plugin.xml
index 6f17e11..dd88423 100644
--- a/plugins/src/http_checker/plugin.xml
+++ b/plugins/src/http_checker/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<PLUGIN min-version="0.9" max-version="0.9">
+<PLUGIN min-version="0.9" max-version="0.10">
 <NAME>http_checker</NAME>
 <VERSION>0.1</VERSION>
 <AUTHOR>The Free Software Foundation Inc.</AUTHOR>
diff --git a/plugins/src/mime_magic/plugin.xml b/plugins/src/mime_magic/plugin.xml
index 9b6c606..805b6f2 100755
--- a/plugins/src/mime_magic/plugin.xml
+++ b/plugins/src/mime_magic/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<PLUGIN min-version="0.9" max-version="0.9">
+<PLUGIN min-version="0.9" max-version="0.10">
 	<NAME>mime_magic</NAME>
 	<VERSION>0.1</VERSION>
 	<AUTHOR>The Free Software Foundation Inc.</AUTHOR>
diff --git a/plugins/src/python/plugin.xml b/plugins/src/python/plugin.xml
index ae4ac0b..3cec600 100644
--- a/plugins/src/python/plugin.xml
+++ b/plugins/src/python/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<PLUGIN min-version="0.9" max-version="0.9">
+<PLUGIN min-version="0.9" max-version="0.10">
 <NAME>python</NAME>
 <VERSION>0.1</VERSION>
 <AUTHOR>The MyServer Team</AUTHOR>
diff --git a/plugins/src/python_http_handler/plugin.xml b/plugins/src/python_http_handler/plugin.xml
index 9fbfbc5..08cf3d3 100644
--- a/plugins/src/python_http_handler/plugin.xml
+++ b/plugins/src/python_http_handler/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<PLUGIN min-version="0.9" max-version="0.9">
+<PLUGIN min-version="0.9" max-version="0.10">
 <NAME>python_http_handler</NAME>
 <VERSION>0.1</VERSION>
 <AUTHOR>The Free Software Foundation Inc.</AUTHOR>
diff --git a/plugins/src/rules_checker/plugin.xml b/plugins/src/rules_checker/plugin.xml
index 0912e18..fa398c3 100644
--- a/plugins/src/rules_checker/plugin.xml
+++ b/plugins/src/rules_checker/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<PLUGIN min-version="0.9" max-version="0.9">
+<PLUGIN min-version="0.9" max-version="0.10">
 <NAME>rules_checker</NAME>
 <VERSION>0.1</VERSION>
 <AUTHOR>The Free Software Foundation Inc.</AUTHOR>



commit 4dc0e9aa4cd67638a98a9bd2a9f883824fa4dfe9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 15:15:52 2010 +0100

    Avoid to preLoad plugins twice.

diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 9cdd8e5..9c482ca 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -288,7 +288,7 @@ PluginsManager::quickLoad (Server *server, const string &plugins)
 
       pinfoAutoPtr.release ();
 
-      Plugin *plugin = preLoadPlugin (file, server, true);
+      Plugin *plugin = pinfo->getPlugin ();
       if (! plugin)
         {
           server->log (MYSERVER_LOG_MSG_ERROR,
@@ -296,9 +296,6 @@ PluginsManager::quickLoad (Server *server, const string &plugins)
           return -1;
         }
 
-      pinfo->setPlugin (plugin);
-      addPluginInfo (name, pinfo);
-
       ret |= plugin->load (server);
       ret |= plugin->postLoad (server);
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/plugin/plugins_manager.cpp    |   13 ++++++++-----
 plugins/src/http_checker/plugin.xml        |    2 +-
 plugins/src/mime_magic/plugin.xml          |    2 +-
 plugins/src/python/plugin.xml              |    2 +-
 plugins/src/python_http_handler/plugin.xml |    2 +-
 plugins/src/rules_checker/plugin.xml       |    2 +-
 6 files changed, 13 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 23 12:02:51 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Njy9r-0003aB-6P
	for mharc-myserver-commit@gnu.org; Tue, 23 Feb 2010 12:02:51 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Njy9i-0003YU-LI
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 12:02:43 -0500
Received: from [140.186.70.92] (port=33978 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Njy9d-0003Xn-1t
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 12:02:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njy9a-0006Xh-D1
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 12:02:36 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:34918
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njy9a-0006Xa-A7
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 12:02:34 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Njy9Z-0003a2-VS
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 17:02:34 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Njy9Y-0001Nt-8l
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 17:02:33 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 066e82ff008c457d753dc1ce1daca163171a0e12
X-Git-Newrev: ef4da49b38d71a122baf5e3540fb5b5a611f2f37
Message-Id: <E1Njy9Y-0001Nt-8l@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 23 Feb 2010 17:02:32 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-35-gef4da49
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Feb 2010 17:02:45 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  ef4da49b38d71a122baf5e3540fb5b5a611f2f37 (commit)
       via  cd677cb139885b450448d93fb08af6474902a0c3 (commit)
       via  e227b682cbbe4c1c6b7c991750a6002712d690c8 (commit)
      from  066e82ff008c457d753dc1ce1daca163171a0e12 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit ef4da49b38d71a122baf5e3540fb5b5a611f2f37
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 18:02:19 2010 +0100

    Introduce a macro PLUGIN_NAME to simplify the plugin name export.

diff --git a/myserver/include/plugin/plugin.h b/myserver/include/plugin/plugin.h
index 3e44854..721310a 100644
--- a/myserver/include/plugin/plugin.h
+++ b/myserver/include/plugin/plugin.h
@@ -25,6 +25,9 @@
 # define EXPORTABLE(x) extern "C" x
 # endif
 
+#define PLUGIN_NAME(X) static const char * __name = X; \
+        EXPORTABLE(const char*) name (){return X;}
+
 # include "myserver.h"
 # include <include/base/dynamic_lib/dynamiclib.h>
 # include <include/base/hash_map/hash_map.h>
@@ -44,7 +47,7 @@ public:
   virtual int preLoad (string& file, bool global);
   virtual int postLoad (Server* server);
   virtual int unLoad ();
-  virtual const char* getName (char* buffer, u_long len);
+  virtual const char* getName ();
   virtual void* getDirectMethod (char* name);
 protected:
   DynamicLibrary hinstLib;
diff --git a/myserver/src/plugin/plugin.cpp b/myserver/src/plugin/plugin.cpp
index f104dca..0c4310a 100644
--- a/myserver/src/plugin/plugin.cpp
+++ b/myserver/src/plugin/plugin.cpp
@@ -24,7 +24,7 @@ typedef int (*loadPROC)(Server*);
 typedef int (*postLoadPROC)(Server*);
 typedef int (*unLoadPROC)();
 typedef int (*versionPROC)();
-typedef const char* (*getNamePROC)(char*, u_long);
+typedef const char* (*getNamePROC)();
 
 /*!
  * Construct a plugin object.
@@ -106,19 +106,18 @@ int Plugin::unLoad ()
 
 /*!
  * Get the plugin name.
- * \param buffer The buffer where write the plugin name.
- * \param len The buffer length in bytes.
  */
-const char* Plugin::getName (char* buffer, u_long len)
+const char* Plugin::getName ()
 {
   getNamePROC proc;
   if (!hinstLib.validHandle ())
-    return 0;
-  proc = (getNamePROC)hinstLib.getProc ("name");
+    return NULL;
+
+  proc = (getNamePROC) hinstLib.getProc ("name");
   if (proc)
-    return proc (buffer, len);
+    return proc ();
 
-  return 0;
+  return NULL;
 }
 
 /*!
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 038c681..6da2ebb 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -492,7 +492,7 @@ PluginsManager::preLoadPlugin (string &file, Server* server, bool global)
       delete plugin;
       return NULL;
     }
-  namePtr = plugin->getName (0, 0);
+  namePtr = plugin->getName ();
 
   if (namePtr)
     name.assign (namePtr);
diff --git a/myserver/tests/test_plugins_manager.cpp b/myserver/tests/test_plugins_manager.cpp
index c2bb5d8..cd8e836 100644
--- a/myserver/tests/test_plugins_manager.cpp
+++ b/myserver/tests/test_plugins_manager.cpp
@@ -84,6 +84,13 @@ public:
   }
 
 protected:
+  virtual PluginInfo* loadInfo (Server* server, string &name, string &path)
+  {
+    PluginInfo *pinfo = new PluginInfo (name);
+    pinfo->setPlugin (new MockPlugin ());
+    return pinfo;
+  }
+
   virtual int loadFile (Server* server, string &name, string &file,
                         PluginInfo* pinfo)
   {
@@ -95,7 +102,7 @@ protected:
 
   virtual Plugin* preLoadPlugin (string &file, Server* server, bool global)
   {
-    new MockPlugin ();
+
   }
 };
 
diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index 0cab65d..ffc897a 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2009 The Free Software Foundation Inc.
+  Copyright (C) 2009, 2010 The Free Software Foundation Inc.
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
@@ -19,13 +19,8 @@
 #include <libguile.h>
 #include <include/plugin/plugin.h>
 
-EXPORTABLE(char*) name (char* name, u_long len)
-{
-  char* str = (char*) "guile";
-  if(name)
-    strncpy(name, str, len);
-  return str;
-}
+
+PLUGIN_NAME ("guile");
 
 EXPORTABLE(int) eval (char *const string)
 {
@@ -33,12 +28,12 @@ EXPORTABLE(int) eval (char *const string)
   return 0;
 }
 
-EXPORTABLE(int) load (void* server,void* parser)
+EXPORTABLE(int) load (void* server, void* parser)
 {
   return 0;
 }
 
-EXPORTABLE(int) postLoad (void* server,void* parser)
+EXPORTABLE(int) postLoad (void* server, void* parser)
 {
   return 0;
 }
diff --git a/plugins/src/mime_magic/mime_magic.cpp b/plugins/src/mime_magic/mime_magic.cpp
index 617a39b..b948b7d 100755
--- a/plugins/src/mime_magic/mime_magic.cpp
+++ b/plugins/src/mime_magic/mime_magic.cpp
@@ -26,6 +26,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <magic.h>
 #include <include/plugin/plugin.h>
 
+PLUGIN_NAME ("mime_magic");
+
 class MagicHandler : public MimeManagerHandler
 {
 public:
@@ -54,7 +56,7 @@ public:
     close ();
   }
 
-	virtual MimeRecord *getMIME (const char *file)
+  virtual MimeRecord *getMIME (const char *file)
   {
     MimeRecord *rec = NULL;
     lock.lock ();
@@ -95,18 +97,10 @@ private:
 
 static MagicHandler *handler;
 
-EXPORTABLE(char*) name (char* name, u_long len)
-{
-	char* str = (char*) "mime_magic";
-	if (name)
-		strncpy (name, str, len);
-	return str;
-}
-
 EXPORTABLE(int) load (void* server)
 {
   handler = NULL;
-	return 0;
+  return 0;
 }
 
 static MimeManagerHandler *builder ()
@@ -121,20 +115,20 @@ void XmlMimeHandler::registerBuilder (MimeManager& manager)
 EXPORTABLE(int) postLoad (void* server)
 {
   string name ("mime_magic");
-	Server *serverInstance = (Server*)server;
+  Server *serverInstance = (Server*)server;
   MimeManager *mimeManager = serverInstance->getMimeManager ();
 
   MagicHandler *handler = new MagicHandler;
   if (handler->load (NULL))
     {
       serverInstance->log (MYSERVER_LOG_MSG_ERROR,
-                                  _("cannot load mime magic configuration"));
+                           _("cannot load mime magic configuration"));
       return 1;
     }
 
   mimeManager->registerHandler (name, handler);
   mimeManager->registerBuilder (name, builder);
-	return 0;
+  return 0;
 }
 
 EXPORTABLE(int) unLoad()
@@ -142,5 +136,5 @@ EXPORTABLE(int) unLoad()
   if (handler)
     delete handler;
 
-	return 0;
+  return 0;
 }
diff --git a/plugins/src/python/python.cpp b/plugins/src/python/python.cpp
index f1db8c3..84b71d0 100644
--- a/plugins/src/python/python.cpp
+++ b/plugins/src/python/python.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+  Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
@@ -22,16 +22,7 @@ HashMap<ThreadID, PythonData*> pythonThreadData;
 
 static Server *serverInstance;
 
-char* name (char* name, u_long len)
-{
-	char* str = (char*)"python";
-
-	if (name)
-		strncpy (name, str, len);
-
-	return str;
-}
-
+PLUGIN_NAME ("python");
 
 PyInterpreterState* PythonData::getInterpreter ()
 {
@@ -43,29 +34,29 @@ PyInterpreterState* PythonData::getInterpreter ()
 
 PythonData::PythonData ()
 {
-	clear ();
+  clear ();
 }
 
 void PythonData::clear ()
 {
-	interp = 0;
+  interp = 0;
 }
 
 
 
 int load (void* server)
 {
-	serverInstance = (Server*)server;
-	const char* pathData = serverInstance->getData("PYTHON_PATH");
-	PyThreadState * mainThreadState;
-	if (pathData)
+  serverInstance = (Server*)server;
+  const char* pathData = serverInstance->getData("PYTHON_PATH");
+  PyThreadState * mainThreadState;
+  if (pathData)
     {
       string path (pathData);
       FilesUtility::completePath (path);
 
       setenv ("PYTHONPATH", path.c_str(), 1);
     }
-	else
+  else
     {
       string path (".");
       FilesUtility::completePath (path);
@@ -74,54 +65,54 @@ int load (void* server)
     }
 
   Py_SetProgramName ((char *)("python"));
-	Py_Initialize ();
-	PyEval_InitThreads ();
+  Py_Initialize ();
+  PyEval_InitThreads ();
 
-	mainThreadState = PyThreadState_Get ();
+  mainThreadState = PyThreadState_Get ();
 
-	pythonMainInterpreterState = mainThreadState->interp;
+  pythonMainInterpreterState = mainThreadState->interp;
 
-	PyEval_ReleaseLock ();
+  PyEval_ReleaseLock ();
 
-	return 0;
+  return 0;
 }
 
 /*! Unload the plugin.  Called once.  Returns 0 on success.  */
 int unLoad (void* p)
 {
-	PyInterpreterState *interpreter = NULL;
-	PyThreadState *threadState = NULL;
-	PythonData* data = NULL;
-	ThreadID tid = Thread::threadID ();
+  PyInterpreterState *interpreter = NULL;
+  PyThreadState *threadState = NULL;
+  PythonData* data = NULL;
+  ThreadID tid = Thread::threadID ();
 
-	PyEval_AcquireLock ();
+  PyEval_AcquireLock ();
 
 
-	data = pythonThreadData.get (tid);
-	if(data == 0)
+  data = pythonThreadData.get (tid);
+  if(data == 0)
     {
       data = new PythonData ();
       pythonThreadData.put (tid, data);
     }
 
-	interpreter = data->getInterpreter ();
-	threadState = PyThreadState_New (interpreter);
+  interpreter = data->getInterpreter ();
+  threadState = PyThreadState_New (interpreter);
 
-	PyThreadState_Swap (threadState);
+  PyThreadState_Swap (threadState);
 
 
-	Py_Finalize ();
+  Py_Finalize ();
 
 
-	PyThreadState_Swap (NULL);
+  PyThreadState_Swap (NULL);
 
 
-	PyEval_ReleaseLock ();
+  PyEval_ReleaseLock ();
 
-	HashMap<ThreadID, PythonData*>::Iterator it = pythonThreadData.begin ();
-	while (it != pythonThreadData.end ())
-		delete *it++;
-	return 0;
+  HashMap<ThreadID, PythonData*>::Iterator it = pythonThreadData.begin ();
+  while (it != pythonThreadData.end ())
+    delete *it++;
+  return 0;
 }
 
 int execute (char* code, u_long length)
@@ -132,30 +123,30 @@ int execute (char* code, u_long length)
 int executeImpl (char* code, u_long length, PyThreadState *threadState,
                  int newThreadState)
 {
-	PyInterpreterState *interpreter = NULL;
-	PythonData* data = NULL;
-	ThreadID tid = Thread::threadID ();
+  PyInterpreterState *interpreter = NULL;
+  PythonData* data = NULL;
+  ThreadID tid = Thread::threadID ();
 
-	PyEval_AcquireLock ();
+  PyEval_AcquireLock ();
 
-	data = pythonThreadData.get (tid);
-	if (data == 0)
+  data = pythonThreadData.get (tid);
+  if (data == 0)
     {
       data = new PythonData();
       pythonThreadData.put(tid, data);
     }
 
-	interpreter = data->getInterpreter ();
+  interpreter = data->getInterpreter ();
 
   if (newThreadState)
     threadState = PyThreadState_New (interpreter);
 
-	PyThreadState_Swap (threadState);
+  PyThreadState_Swap (threadState);
 
 
-	PyRun_SimpleString (code);
+  PyRun_SimpleString (code);
 
-	PyThreadState_Swap (NULL);
+  PyThreadState_Swap (NULL);
 
   if (newThreadState)
     {
@@ -163,7 +154,7 @@ int executeImpl (char* code, u_long length, PyThreadState *threadState,
       PyThreadState_Delete (threadState);
     }
 
-	PyEval_ReleaseLock ();
+  PyEval_ReleaseLock ();
 
   return 0;
 
@@ -178,41 +169,41 @@ int executeFromFile (char* filename)
 int executeFromFileImpl(char* filename, PyThreadState *threadState,
                         int newThreadState)
 {
-	PyInterpreterState *interpreter = NULL;
-	int ret = 0;
-	FILE *file = NULL;
-	PythonData* data = NULL;
-	ThreadID tid = Thread::threadID ();
+  PyInterpreterState *interpreter = NULL;
+  int ret = 0;
+  FILE *file = NULL;
+  PythonData* data = NULL;
+  ThreadID tid = Thread::threadID ();
 
-	PyEval_AcquireLock ();
+  PyEval_AcquireLock ();
 
-	data = pythonThreadData.get (tid);
-	if(data == 0)
+  data = pythonThreadData.get (tid);
+  if(data == 0)
     {
       data = new PythonData ();
       pythonThreadData.put (tid, data);
     }
 
-	interpreter = data->getInterpreter ();
+  interpreter = data->getInterpreter ();
 
   if (newThreadState)
     threadState = PyThreadState_New (interpreter);
 
-	PyThreadState_Swap (threadState);
+  PyThreadState_Swap (threadState);
 
-	file = fopen (filename, "r");
+  file = fopen (filename, "r");
 
-	if(file == 0)
+  if(file == 0)
     {
       serverInstance->log (MYSERVER_LOG_MSG_ERROR,
                            _("Python: cannot load file %s"), filename);
       ret = -1;
     }
-	else
-		ret = PyRun_AnyFileEx (file, filename, 1);
+  else
+    ret = PyRun_AnyFileEx (file, filename, 1);
 
 
-	PyThreadState_Swap (NULL);
+  PyThreadState_Swap (NULL);
 
   if (newThreadState)
     {
@@ -220,7 +211,7 @@ int executeFromFileImpl(char* filename, PyThreadState *threadState,
       PyThreadState_Delete(threadState);
     }
 
-	PyEval_ReleaseLock ();
+  PyEval_ReleaseLock ();
 
   return ret;
 
@@ -235,32 +226,32 @@ PyObject* callObject(PyObject *obj, PyObject *args)
 PyObject* callObjectImpl(PyObject *obj, PyObject *args,
                          PyThreadState *threadState, int newThreadState)
 {
-	PyInterpreterState *interpreter = NULL;
-	PythonData* data = NULL;
-	ThreadID tid = Thread::threadID();
+  PyInterpreterState *interpreter = NULL;
+  PythonData* data = NULL;
+  ThreadID tid = Thread::threadID();
   PyObject *result;
 
-	PyEval_AcquireLock ();
+  PyEval_AcquireLock ();
 
-	data = pythonThreadData.get (tid);
-	if(data == 0)
+  data = pythonThreadData.get (tid);
+  if(data == 0)
     {
       data = new PythonData ();
       pythonThreadData.put (tid, data);
     }
 
-	interpreter = data->getInterpreter();
+  interpreter = data->getInterpreter();
 
   if (newThreadState)
     threadState = PyThreadState_New(interpreter);
 
-	PyThreadState_Swap (threadState);
+  PyThreadState_Swap (threadState);
 
 
   result = PyEval_CallObject (obj, args);
 
 
-	PyThreadState_Swap (NULL);
+  PyThreadState_Swap (NULL);
 
   if (newThreadState)
     {
@@ -268,7 +259,7 @@ PyObject* callObjectImpl(PyObject *obj, PyObject *args,
       PyThreadState_Delete (threadState);
     }
 
-	PyEval_ReleaseLock ();
+  PyEval_ReleaseLock ();
 
   return result;
 }
@@ -276,33 +267,33 @@ PyObject* callObjectImpl(PyObject *obj, PyObject *args,
 
 int initModule (char* name, PyMethodDef methods[])
 {
-	PyInterpreterState *interpreter = NULL;
-	PyThreadState *threadState = NULL;
-	PythonData* data = NULL;
-	ThreadID tid = Thread::threadID ();
+  PyInterpreterState *interpreter = NULL;
+  PyThreadState *threadState = NULL;
+  PythonData* data = NULL;
+  ThreadID tid = Thread::threadID ();
 
-	PyEval_AcquireLock ();
+  PyEval_AcquireLock ();
 
-	data = pythonThreadData.get (tid);
-	if (data == 0)
+  data = pythonThreadData.get (tid);
+  if (data == 0)
     {
       data = new PythonData ();
       pythonThreadData.put (tid, data);
     }
 
-	interpreter = data->getInterpreter ();
-	threadState = PyThreadState_New (interpreter);
+  interpreter = data->getInterpreter ();
+  threadState = PyThreadState_New (interpreter);
 
-	PyThreadState_Swap (threadState);
+  PyThreadState_Swap (threadState);
 
 
-	Py_InitModule (name, methods);
+  Py_InitModule (name, methods);
 
-	PyThreadState_Swap (NULL);
+  PyThreadState_Swap (NULL);
 
 
-	PyEval_ReleaseLock ();
+  PyEval_ReleaseLock ();
 
-	return 0;
+  return 0;
 }
 
diff --git a/plugins/src/python/python.h b/plugins/src/python/python.h
index 13f6470..7c98348 100644
--- a/plugins/src/python/python.h
+++ b/plugins/src/python/python.h
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2007, 2008 The MyServer Team
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2007, 2008, 2010 The MyServer Team
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <Python.h>
@@ -28,29 +28,30 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 struct PythonData
 {
-	PyThreadState* interp;
-	PyInterpreterState* getInterpreter();
-	PythonData();
-	void clear();
+  PyThreadState* interp;
+  PyInterpreterState* getInterpreter();
+  PythonData();
+  void clear();
 };
 
 extern HashMap<ThreadID, PythonData*> pythonThreadData;
 
-EXPORTABLE(char*) name(char* name, u_long len);
+EXPORTABLE(int) load (void* server,void* parser);
+EXPORTABLE(int) unLoad (void* p);
 
-EXPORTABLE(int) load(void* server,void* parser);
-EXPORTABLE(int) unLoad(void* p);
 
+EXPORTABLE(int) execute (char* code, u_long length);
+EXPORTABLE(int) executeFromFile (char* filename);
 
-EXPORTABLE(int) execute(char* code, u_long length);
-EXPORTABLE(int) executeFromFile(char* filename);
 
+EXPORTABLE(int) executeImpl (char* code, u_long length,
+                             PyThreadState *threadState, int newThreadState);
+EXPORTABLE(int) executeFromFileImpl (char* filename, PyThreadState *threadState,
+                                     int newThreadState);
 
-EXPORTABLE(int) executeImpl (char* code, u_long length, PyThreadState *threadState, int newThreadState);
-EXPORTABLE(int) executeFromFileImpl(char* filename, PyThreadState *threadState, int newThreadState);
+EXPORTABLE(PyObject*) callObject (PyObject *obj, PyObject *args);
+EXPORTABLE(PyObject*) callObjectImpl (PyObject *obj, PyObject *args,
+                                      PyThreadState *threadState, int newThreadState);
 
-EXPORTABLE(PyObject*) callObject(PyObject *obj, PyObject *args);
-EXPORTABLE(PyObject*) callObjectImpl(PyObject *obj, PyObject *args, PyThreadState *threadState, int newThreadState);
 
-
-EXPORTABLE(int) initModule(char*, PyMethodDef[]);
+EXPORTABLE(int) initModule (char*, PyMethodDef[]);
diff --git a/plugins/src/python_http_handler/python_http_handler.cpp b/plugins/src/python_http_handler/python_http_handler.cpp
index e56b112..bd588a5 100644
--- a/plugins/src/python_http_handler/python_http_handler.cpp
+++ b/plugins/src/python_http_handler/python_http_handler.cpp
@@ -27,6 +27,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/conf/main/xml_main_configuration.h>
 #include <include/plugin/plugin.h>
 
+
+PLUGIN_NAME ("python_http_handler");
+
 static Server* serverInstance;
 
 typedef int (*executePROC)(char*, u_long);
@@ -34,8 +37,8 @@ typedef int (*executeFromFilePROC)(char*);
 
 class ThreadData : public HttpDataHandler
 {
-	HttpThreadContext* td;
-	int ret;
+  HttpThreadContext* td;
+  int ret;
   bool keepalive;
   bool useChunks;
   FiltersChain chain;
@@ -47,14 +50,14 @@ public:
     ret = 0;
   }
 
-	HttpThreadContext* getHttpThreadContext (){return td;}
-	int getRet (){return ret;}
+  HttpThreadContext* getHttpThreadContext (){return td;}
+  int getRet (){return ret;}
 
-	void setHttpThreadContext (HttpThreadContext* td){this->td = td;}
-	void setRet (int r){ret = r;}
+  void setHttpThreadContext (HttpThreadContext* td){this->td = td;}
+  void setRet (int r){ret = r;}
 
 
-	virtual int send (HttpThreadContext*, ConnectionPtr s,
+  virtual int send (HttpThreadContext*, ConnectionPtr s,
                     const char* exec, const char* cmdLine,
                     int execute, int onlyHeader)
   {
@@ -85,94 +88,94 @@ static INIT_MODULE init;
 
 static ThreadData* getThreadData ()
 {
-	ThreadID tid = Thread::threadID();
-	ThreadData* ret;
-	mutex.lock ();
-	ret = pythonThreadData.get (tid);
-	mutex.unlock ();
-	return ret;
+  ThreadID tid = Thread::threadID();
+  ThreadData* ret;
+  mutex.lock ();
+  ret = pythonThreadData.get (tid);
+  mutex.unlock ();
+  return ret;
 }
 
 static HttpThreadContext* getThreadContext ()
 {
-	return getThreadData ()->getHttpThreadContext ();
+  return getThreadData ()->getHttpThreadContext ();
 }
 
 static PyObject *get_remote_addr (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
   return Py_BuildValue((char*)"s", context->connection->getIpAddr ());
 }
 
 static PyObject *get_remote_port (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
   return Py_BuildValue((char*)"i", context->connection->getPort ());
 }
 
 static PyObject *get_local_addr (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
   return Py_BuildValue ((char*)"s", context->connection->getLocalIpAddr ());
 }
 
 static PyObject *get_local_port (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
   return Py_BuildValue ((char*)"i", context->connection->getLocalPort ());
 }
 
 
 static PyObject *get_response_header (PyObject *self, PyObject *args)
 {
-	char *header;
-	string value;
-	if (!PyArg_ParseTuple (args, (char*)"s", &header))
-		return NULL;
+  char *header;
+  string value;
+  if (!PyArg_ParseTuple (args, (char*)"s", &header))
+    return NULL;
 
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
 
-	context->response.getValue (header, &value);
+  context->response.getValue (header, &value);
 
-	return Py_BuildValue ((char*)"s", value.c_str());
+  return Py_BuildValue ((char*)"s", value.c_str());
 }
 
 static PyObject *get_request_header (PyObject *self, PyObject *args)
 {
-	char *header;
-	string value;
-	if (!PyArg_ParseTuple(args, (char*)"s", &header))
-		return NULL;
+  char *header;
+  string value;
+  if (!PyArg_ParseTuple(args, (char*)"s", &header))
+    return NULL;
 
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
 
-	context->request.getValue (header, &value);
+  context->request.getValue (header, &value);
 
-	return Py_BuildValue ((char*)"s", value.c_str ());
+  return Py_BuildValue ((char*)"s", value.c_str ());
 }
 
 static PyObject *log_server_error (PyObject *self, PyObject *args)
 {
-	char *msg;
+  char *msg;
 
-	if (!PyArg_ParseTuple(args, (char*)"s", &msg))
-		return NULL;
+  if (!PyArg_ParseTuple(args, (char*)"s", &msg))
+    return NULL;
 
   serverInstance->log (MYSERVER_LOG_MSG_ERROR, "%s", msg);
-	return NULL;
+  return NULL;
 }
 
 static PyObject *set_response_header (PyObject *self, PyObject *args)
 {
-	char *header;
-	char *value;
-	const char* ret;
-	if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
-		return NULL;
+  char *header;
+  char *value;
+  const char* ret;
+  if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
+    return NULL;
 
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
 
-	string *retS =  context->response.setValue (header, value);
+  string *retS =  context->response.setValue (header, value);
 
   if (retS)
     {
@@ -184,15 +187,15 @@ static PyObject *set_response_header (PyObject *self, PyObject *args)
 
 static PyObject *set_request_header (PyObject *self, PyObject *args)
 {
-	char *header;
-	char *value;
-	const char* ret;
-	if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
-		return NULL;
+  char *header;
+  char *value;
+  const char* ret;
+  if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
+    return NULL;
 
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
 
-	string *retS =  context->request.setValue (header, value);
+  string *retS =  context->request.setValue (header, value);
   if (retS)
     {
       ret = retS->c_str ();
@@ -203,8 +206,8 @@ static PyObject *set_request_header (PyObject *self, PyObject *args)
 
 static PyObject *send_header (PyObject *self, PyObject *args)
 {
-	ThreadData *tdata = getThreadData ();
-	HttpThreadContext* td = tdata->getHttpThreadContext ();
+  ThreadData *tdata = getThreadData ();
+  HttpThreadContext* td = tdata->getHttpThreadContext ();
 
   tdata->check ();
 
@@ -212,7 +215,7 @@ static PyObject *send_header (PyObject *self, PyObject *args)
                                         &(td->response));
 
   if(td->connection->socket->send (td->buffer->getBuffer(),
-                                  (u_long)strlen(td->buffer->getBuffer()), 0)
+                                   (u_long)strlen(td->buffer->getBuffer()), 0)
      < 0)
     return Py_BuildValue((char*)"i", 1);
 
@@ -223,261 +226,252 @@ static PyObject *send_header (PyObject *self, PyObject *args)
 
 static PyObject *get_document_root (PyObject *self, PyObject *args)
 {
-	char *data;
-	if (!PyArg_ParseTuple(args, (char*)"s", &data))
-		return NULL;
+  char *data;
+  if (!PyArg_ParseTuple(args, (char*)"s", &data))
+    return NULL;
 
-	HttpThreadContext* context = getThreadContext ();
+  HttpThreadContext* context = getThreadContext ();
 
-	return Py_BuildValue ((char*)"s", context->getVhostDir ());
+  return Py_BuildValue ((char*)"s", context->getVhostDir ());
 }
 
 static PyObject *send_data (PyObject *self, PyObject *args)
 {
-	char *data;
+  char *data;
   u_long size = 0;
-	if (!PyArg_ParseTuple(args, (char*)"s", &data))
-		return NULL;
+  if (!PyArg_ParseTuple(args, (char*)"s", &data))
+    return NULL;
 
   size = strlen (data);
 
-	ThreadData *tdata = getThreadData ();
+  ThreadData *tdata = getThreadData ();
 
   if (tdata->send(data, size))
     return Py_BuildValue ((char*)"i", 0);
 
   tdata->setRet (1);
 
-	return Py_BuildValue((char*)"i", size);
+  return Py_BuildValue((char*)"i", size);
 }
 
 static PyObject *end_send_data (PyObject *, PyObject *)
 {
-	ThreadData *tdata = getThreadData ();
+  ThreadData *tdata = getThreadData ();
 
   tdata->send (0, 0);
 
-	return Py_BuildValue ((char*)"i", 0);
+  return Py_BuildValue ((char*)"i", 0);
 }
 
 static PyObject *raise_error (PyObject *self, PyObject *args)
 {
-	int error;
-	if (!PyArg_ParseTuple(args, (char*)"i", &error))
-		return NULL;
+  int error;
+  if (!PyArg_ParseTuple(args, (char*)"i", &error))
+    return NULL;
 
-	ThreadData* data = getThreadData ();
+  ThreadData* data = getThreadData ();
 
-	if(data->getRet())
-		return NULL;
+  if(data->getRet())
+    return NULL;
 
-	data->getHttpThreadContext ()->http->raiseHTTPError (error);
+  data->getHttpThreadContext ()->http->raiseHTTPError (error);
 
-	data->setRet (1);
+  data->setRet (1);
 
-	return Py_BuildValue ((char*)"s", "");
+  return Py_BuildValue ((char*)"s", "");
 }
 
 
 static PyObject *is_ssl (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext ();
-	int isSsl = context->http->getProtocolOptions () & Protocol::SSL;
+  HttpThreadContext* context = getThreadContext ();
+  int isSsl = context->http->getProtocolOptions () & Protocol::SSL;
 
-	return Py_BuildValue ((char*)"b", isSsl);
+  return Py_BuildValue ((char*)"b", isSsl);
 }
 
 
 static PyObject *send_redirect (PyObject *self, PyObject *args)
 {
-	char* dest;
-	if (!PyArg_ParseTuple(args, (char*)"s", &dest))
-		return NULL;
+  char* dest;
+  if (!PyArg_ParseTuple(args, (char*)"s", &dest))
+    return NULL;
 
-	ThreadData* data = getThreadData ();
+  ThreadData* data = getThreadData ();
 
-	if (data->getRet())
-		return NULL;
+  if (data->getRet())
+    return NULL;
 
-	data->getHttpThreadContext ()->http->sendHTTPRedirect (dest);
+  data->getHttpThreadContext ()->http->sendHTTPRedirect (dest);
 
-	data->setRet (1);
+  data->setRet (1);
 
-	return Py_BuildValue ((char*)"s", dest);
+  return Py_BuildValue ((char*)"s", dest);
 }
 
 static PyMethodDef PythonHttpHandlerMethods[] = {
-	{(char*)"get_remote_port", get_remote_port, METH_VARARGS, (char*)"Get the remote TCP port"},
-	{(char*)"get_local_port", get_local_port, METH_VARARGS, (char*)"Get the local TCP port"},
-	{(char*)"get_remote_addr", get_remote_addr, METH_VARARGS, (char*)"Get the remote IP address"},
-	{(char*)"get_local_addr", get_local_addr, METH_VARARGS, (char*)"Get the local IP address"},
-	{(char*)"get_request_header", get_request_header, METH_VARARGS, (char*)"Get HTTP request header field value"},
-	{(char*)"set_request_header", set_request_header, METH_VARARGS, (char*)"Set HTTP request header field value"},
-	{(char*)"get_response_header", get_response_header, METH_VARARGS, (char*)"Get HTTP response header field value"},
-	{(char*)"set_response_header", set_response_header, METH_VARARGS, (char*)"Set HTTP response header field value"},
-	{(char*)"send_redirect", send_redirect, METH_VARARGS, (char*)"Send a redirect to another location"},
-	{(char*)"raise_error", raise_error, METH_VARARGS, (char*)"Raise HTTP error page"},
-	{(char*)"send_data", send_data, METH_VARARGS, (char*)"Send data to the client"},
-	{(char*)"send_header", send_header, METH_VARARGS, (char*)"Send the HTTP header to the client"},
-	{(char*)"end_send_data", end_send_data, METH_VARARGS, (char*)"Complete a data transfer"},
-	{(char*)"get_document_root", get_document_root, METH_VARARGS, (char*)"Return the document root directory"},
-	{(char*)"is_ssl", is_ssl, METH_VARARGS, (char*)"Check if the connection is using a secure channel"},
-	{(char*)"log_server_error", log_server_error, METH_VARARGS, (char*)"Log a server message"},
-	{NULL, NULL, 0, NULL}
+  {(char*)"get_remote_port", get_remote_port, METH_VARARGS, (char*)"Get the remote TCP port"},
+  {(char*)"get_local_port", get_local_port, METH_VARARGS, (char*)"Get the local TCP port"},
+  {(char*)"get_remote_addr", get_remote_addr, METH_VARARGS, (char*)"Get the remote IP address"},
+  {(char*)"get_local_addr", get_local_addr, METH_VARARGS, (char*)"Get the local IP address"},
+  {(char*)"get_request_header", get_request_header, METH_VARARGS, (char*)"Get HTTP request header field value"},
+  {(char*)"set_request_header", set_request_header, METH_VARARGS, (char*)"Set HTTP request header field value"},
+  {(char*)"get_response_header", get_response_header, METH_VARARGS, (char*)"Get HTTP response header field value"},
+  {(char*)"set_response_header", set_response_header, METH_VARARGS, (char*)"Set HTTP response header field value"},
+  {(char*)"send_redirect", send_redirect, METH_VARARGS, (char*)"Send a redirect to another location"},
+  {(char*)"raise_error", raise_error, METH_VARARGS, (char*)"Raise HTTP error page"},
+  {(char*)"send_data", send_data, METH_VARARGS, (char*)"Send data to the client"},
+  {(char*)"send_header", send_header, METH_VARARGS, (char*)"Send the HTTP header to the client"},
+  {(char*)"end_send_data", end_send_data, METH_VARARGS, (char*)"Complete a data transfer"},
+  {(char*)"get_document_root", get_document_root, METH_VARARGS, (char*)"Return the document root directory"},
+  {(char*)"is_ssl", is_ssl, METH_VARARGS, (char*)"Check if the connection is using a secure channel"},
+  {(char*)"log_server_error", log_server_error, METH_VARARGS, (char*)"Log a server message"},
+  {NULL, NULL, 0, NULL}
 };
 
 
 class HttpObserver : public Multicast<string, void*, int>
 {
-	struct Item
-	{
-		string data;
-		bool file;
-	};
+  struct Item
+  {
+    string data;
+    bool file;
+  };
 public:
 
-	virtual int updateMulticast (MulticastRegistry<string, void*, int>* reg,
+  virtual int updateMulticast (MulticastRegistry<string, void*, int>* reg,
                                string& msg, void* arg)
-	{
-		HttpThreadContext *td = (HttpThreadContext*)arg;
-		ThreadID tid = Thread::threadID ();
-		list<Item>::iterator it;
-		mutex.lock ();
-		ThreadData threadData (td);
-		pythonThreadData.put (tid, &threadData);
-		mutex.unlock ();
-
-		init ((char*)"python_http_handler_internal", PythonHttpHandlerMethods);
-
-		for (it = rules.begin (); it != rules.end (); it++)
+  {
+    HttpThreadContext *td = (HttpThreadContext*)arg;
+    ThreadID tid = Thread::threadID ();
+    list<Item>::iterator it;
+    mutex.lock ();
+    ThreadData threadData (td);
+    pythonThreadData.put (tid, &threadData);
+    mutex.unlock ();
+
+    init ((char*)"python_http_handler_internal", PythonHttpHandlerMethods);
+
+    for (it = rules.begin (); it != rules.end (); it++)
       {
         if ((*it).file)
           {
             char *method = (char*)"executeFromFile";
             executeFromFilePROC execute =
               ((executeFromFilePROC)python->getDirectMethod(method);
-            if (execute)
-              execute((char*)(*it).data.c_str ());
-          }
-        else
-          {
-            executePROC execute =
-              ((executePROC)python->getDirectMethod((char*)"execute"));
-            if (execute)
-              execute ((char*)(*it).data.c_str(), (*it).data.length());
+               if (execute)
+                 execute((char*)(*it).data.c_str ());
+               }
+            else
+              {
+                executePROC execute =
+                ((executePROC)python->getDirectMethod((char*)"execute"));
+                if (execute)
+                  execute ((char*)(*it).data.c_str(), (*it).data.length());
+              }
           }
+        return threadData.getRet ();
       }
-		return threadData.getRet ();
-	}
-
-	void addRule (const char* rule, bool file)
-	{
-		Item it;
-		it.data.assign (rule);
-		it.file = file;
-		rules.push_back (it);
-	}
-
-	void setPythonExecutor (Plugin* python){this->python = python;}
-private:
-	list<Item> rules;
-	Plugin* python;
-};
 
-static HttpObserver observer;
+    void addRule (const char* rule, bool file)
+    {
+      Item it;
+      it.data.assign (rule);
+      it.file = file;
+      rules.push_back (it);
+    }
 
+    void setPythonExecutor (Plugin* python){this->python = python;}
+  private:
+    list<Item> rules;
+    Plugin* python;
+  };
 
-EXPORTABLE(char*) name (char* name, u_long len)
-{
-	char* str = (char*)"python_http_handler";
-	if(name)
-		strncpy(name, str, len);
-	return str;
-}
+  static HttpObserver observer;
 
-EXPORTABLE(int) load (void* server)
-{
-	serverInstance = (Server*)server;
-	string msg("new-http-request");
-	string pythonName("python");
-	Plugin* python;
-  MainConfiguration* configuration;
-	xmlDocPtr xmlDoc;
-	python = serverInstance->getPluginsManager ()->getPlugin (pythonName);
-
-	if(!python)
-    {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
-                           _("PythonHttpHandler: Cannot find python"));
-      return -1;
-    }
-	observer.setPythonExecutor(python);
+  EXPORTABLE(int) load (void* server)
+  {
+    serverInstance = (Server*)server;
+    string msg("new-http-request");
+    string pythonName("python");
+    Plugin* python;
+    MainConfiguration* configuration;
+    xmlDocPtr xmlDoc;
+    python = serverInstance->getPluginsManager ()->getPlugin (pythonName);
+
+    if(!python)
+      {
+        serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                             _("PythonHttpHandler: Cannot find python"));
+        return -1;
+      }
+    observer.setPythonExecutor(python);
 
-  string httpStr ("http");
-  Protocol *p = serverInstance->getProtocolsManager ()->getProtocol (httpStr);
-  static_cast<HttpProtocol*>(p)->addMulticast(msg, &observer);
+    string httpStr ("http");
+    Protocol *p = serverInstance->getProtocolsManager ()->getProtocol (httpStr);
+    static_cast<HttpProtocol*>(p)->addMulticast(msg, &observer);
 
-	init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
+    init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
 
-	if(!init)
-    {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
-      _("PythonHttpHandler: Cannot find method initModule in python"));
-      return -1;
-    }
+    if(!init)
+      {
+        serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                             _("PythonHttpHandler: Cannot find method initModule in python"));
+        return -1;
+      }
 
-  configuration = serverInstance->getConfiguration ();
-
-  /* FIXME: DON'T DO THIS.  */
-  xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
-
-	for (xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
-	  {
-	    if (!xmlStrcmp(ptr->name, (const xmlChar *)"PYTHON_HTTP_HANDLER"))
-	      {
-          bool file = false;
-          xmlAttrPtr properties = ptr->properties;
-          char* data = 0;
-          while (properties)
-            {
-              if (!xmlStrcmp(properties->name, (const xmlChar *)"file"))
-                {
-                  if(properties->children && properties->children->content)
-                    data = (char*)properties->children->content;
-
-                  file = true;
-                }
-              properties = properties->next;
-            }
-
-          if (!file && ptr->children && ptr->children->next
-             && ptr->children->next->content)
-            data = (char*)ptr->children->next->content;
-
-          if (!data)
-            {
-              serverInstance->log (MYSERVER_LOG_MSG_ERROR,
-                                   _("PythonHttpHandler: Invalid rule"));
-              return -1;
-            }
-
-          observer.addRule (data, file);
-	      }
-
-	  }
-
-	mutex.init();
-
-	return 0;
-}
+    configuration = serverInstance->getConfiguration ();
 
-EXPORTABLE(int) postLoad (void* server)
-{
-  return 0;
-}
+    /* FIXME: DON'T DO THIS.  */
+    xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
 
-EXPORTABLE(int) unLoad ()
-{
-  mutex.destroy ();
-  return 0;
-}
+    for (xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
+      {
+        if (!xmlStrcmp(ptr->name, (const xmlChar *)"PYTHON_HTTP_HANDLER"))
+          {
+            bool file = false;
+            xmlAttrPtr properties = ptr->properties;
+            char* data = 0;
+            while (properties)
+              {
+                if (!xmlStrcmp(properties->name, (const xmlChar *)"file"))
+                  {
+                    if(properties->children && properties->children->content)
+                      data = (char*)properties->children->content;
+
+                    file = true;
+                  }
+                properties = properties->next;
+              }
+
+            if (!file && ptr->children && ptr->children->next
+                && ptr->children->next->content)
+              data = (char*)ptr->children->next->content;
+
+            if (!data)
+              {
+                serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                                     _("PythonHttpHandler: Invalid rule"));
+                return -1;
+              }
+
+            observer.addRule (data, file);
+          }
+
+      }
+
+    mutex.init();
+
+    return 0;
+  }
+
+  EXPORTABLE(int) postLoad (void* server)
+  {
+    return 0;
+  }
+
+  EXPORTABLE(int) unLoad ()
+  {
+    mutex.destroy ();
+    return 0;
+  }
diff --git a/plugins/src/rules_checker/rules_checker.cpp b/plugins/src/rules_checker/rules_checker.cpp
index 9f0a622..ae38dd6 100644
--- a/plugins/src/rules_checker/rules_checker.cpp
+++ b/plugins/src/rules_checker/rules_checker.cpp
@@ -23,6 +23,8 @@
 #include "heading.h"
 #include <include/plugin/plugin.h>
 
+PLUGIN_NAME ("rules_checker");
+
 class RulesCheckerObserver : public Multicast<string, void*, int>
 {
   struct Item
@@ -79,15 +81,6 @@ private:
 
 static RulesCheckerObserver observer;
 
-
-EXPORTABLE(char*) name (char* name, u_long len)
-{
-  char* str = (char*)"rules_checker";
-  if(name)
-    strncpy(name, str, len);
-  return str;
-}
-
 EXPORTABLE(int) load (void* server)
 {
   Server* serverInstance = (Server*)server;



commit cd677cb139885b450448d93fb08af6474902a0c3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 17:39:32 2010 +0100

    Move definition of EXPORTABLE in plugin.h

diff --git a/myserver/include/plugin/plugin.h b/myserver/include/plugin/plugin.h
index c405eea..3e44854 100644
--- a/myserver/include/plugin/plugin.h
+++ b/myserver/include/plugin/plugin.h
@@ -19,6 +19,12 @@
 #ifndef PLUGIN_H
 # define PLUGIN_H
 
+#ifdef WIN32
+# define EXPORTABLE(x) x _declspec(dllexport)
+#else
+# define EXPORTABLE(x) extern "C" x
+# endif
+
 # include "myserver.h"
 # include <include/base/dynamic_lib/dynamiclib.h>
 # include <include/base/hash_map/hash_map.h>
diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index b60bcb7..0cab65d 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -17,12 +17,7 @@
 #include <myserver.h>
 
 #include <libguile.h>
-
-#ifdef WIN32
-# define EXPORTABLE(x) x _declspec(dllexport)
-#else
-# define EXPORTABLE(x) extern "C" x
-#endif
+#include <include/plugin/plugin.h>
 
 EXPORTABLE(char*) name (char* name, u_long len)
 {
diff --git a/plugins/src/http_checker/http_checker.cpp b/plugins/src/http_checker/http_checker.cpp
index d30c11f..915907f 100644
--- a/plugins/src/http_checker/http_checker.cpp
+++ b/plugins/src/http_checker/http_checker.cpp
@@ -24,12 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/http/http.h>
 #include <include/plugin/plugin.h>
 #include <include/conf/main/xml_main_configuration.h>
-
-#ifdef WIN32
-# define EXPORTABLE(x) x _declspec(dllexport)
-#else
-# define EXPORTABLE(x) extern "C" x
-#endif
+#include <include/plugin/plugin.h>
 
 typedef int (*executePROC)(char*, u_long);
 typedef int (*executeFromFilePROC)(char*);
diff --git a/plugins/src/mime_magic/mime_magic.cpp b/plugins/src/mime_magic/mime_magic.cpp
index 0709a21..617a39b 100755
--- a/plugins/src/mime_magic/mime_magic.cpp
+++ b/plugins/src/mime_magic/mime_magic.cpp
@@ -24,12 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/conf/mime/mime_manager.h>
 #include <include/base/hash_map/hash_map.h>
 #include <magic.h>
-
-#ifdef WIN32
-#define EXPORTABLE(x) x _declspec(dllexport)
-#else
-#define EXPORTABLE(x) extern "C" x
-#endif
+#include <include/plugin/plugin.h>
 
 class MagicHandler : public MimeManagerHandler
 {
diff --git a/plugins/src/php/php.h b/plugins/src/php/php.h
index fc997ab..ab9753f 100644
--- a/plugins/src/php/php.h
+++ b/plugins/src/php/php.h
@@ -26,12 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/file/files_utility.h>
 #include <include/protocol/http/http.h>
 #include <include/protocol/http/dyn_http_manager.h>
-
-#ifdef WIN32
-#define EXPORTABLE(x) x _declspec(dllexport);
-#else
-#define EXPORTABLE(x) extern "C" x
-#endif
+#include <include/plugin/plugin.h>
 
 EXPORTABLE(char*) name(char* name, u_long len);
 
diff --git a/plugins/src/python/python.h b/plugins/src/python/python.h
index f765d8a..13f6470 100644
--- a/plugins/src/python/python.h
+++ b/plugins/src/python/python.h
@@ -24,7 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/sync/mutex.h>
 #include <include/base/file/file.h>
 #include <include/base/file/files_utility.h>
-
+#include <include/plugin/plugin.h>
 
 struct PythonData
 {
@@ -36,15 +36,6 @@ struct PythonData
 
 extern HashMap<ThreadID, PythonData*> pythonThreadData;
 
-
-
-#ifdef WIN32
-#define EXPORTABLE(x) x _declspec(dllexport)
-#else
-#define EXPORTABLE(x) extern "C" x
-#endif
-
-
 EXPORTABLE(char*) name(char* name, u_long len);
 
 EXPORTABLE(int) load(void* server,void* parser);
diff --git a/plugins/src/python_http_handler/python_http_handler.cpp b/plugins/src/python_http_handler/python_http_handler.cpp
index 806731f..e56b112 100644
--- a/plugins/src/python_http_handler/python_http_handler.cpp
+++ b/plugins/src/python_http_handler/python_http_handler.cpp
@@ -25,16 +25,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/http/http.h>
 #include <include/plugin/plugin.h>
 #include <include/conf/main/xml_main_configuration.h>
-
+#include <include/plugin/plugin.h>
 
 static Server* serverInstance;
 
-#ifdef WIN32
-# define EXPORTABLE(x) x _declspec(dllexport)
-#else
-# define EXPORTABLE(x) extern "C" x
-#endif
-
 typedef int (*executePROC)(char*, u_long);
 typedef int (*executeFromFilePROC)(char*);
 
diff --git a/plugins/src/rules_checker/rules_checker.cpp b/plugins/src/rules_checker/rules_checker.cpp
index f8e78a9..9f0a622 100644
--- a/plugins/src/rules_checker/rules_checker.cpp
+++ b/plugins/src/rules_checker/rules_checker.cpp
@@ -21,12 +21,7 @@
 #include <include/protocol/http/http.h>
 #include <include/conf/main/xml_main_configuration.h>
 #include "heading.h"
-
-#ifdef WIN32
-# define EXPORTABLE(x) x _declspec(dllexport)
-#else
-# define EXPORTABLE(x) extern "C" x
-#endif
+#include <include/plugin/plugin.h>
 
 class RulesCheckerObserver : public Multicast<string, void*, int>
 {



commit e227b682cbbe4c1c6b7c991750a6002712d690c8
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 17:29:25 2010 +0100

    Add guile interpreter plugin.

diff --git a/plugins/src/guile/SConscript b/plugins/src/guile/SConscript
new file mode 100644
index 0000000..b9b76f2
--- /dev/null
+++ b/plugins/src/guile/SConscript
@@ -0,0 +1,29 @@
+#-*- mode: python -*-
+Import('dest_dir','listinc')
+
+local_listinc=[
+      GetLaunchDir(),
+      '../../../',
+      '/usr/local/include',
+      '/usr/include/',
+      '/usr/include/guile',
+      '/usr/local/include/guile',
+      '/usr/local/include/libxml2',
+      '/usr/include/libxml2',
+      '.'
+      ]
+
+local_listinc.extend(listinc)
+
+env = Environment(CPPPATH=local_listinc)
+
+conf = Configure(env, config_h="config.h")
+
+if conf.CheckHeader("libguile.h"):
+    conf.Define('GUILE', 1)
+
+env = conf.Finish()
+
+env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/guile", ["guile.cpp" ], SHLIBPREFIX="")
+
+
diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
new file mode 100644
index 0000000..b60bcb7
--- /dev/null
+++ b/plugins/src/guile/guile.cpp
@@ -0,0 +1,54 @@
+/*
+  MyServer
+  Copyright (C) 2009 The Free Software Foundation Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <myserver.h>
+
+#include <libguile.h>
+
+#ifdef WIN32
+# define EXPORTABLE(x) x _declspec(dllexport)
+#else
+# define EXPORTABLE(x) extern "C" x
+#endif
+
+EXPORTABLE(char*) name (char* name, u_long len)
+{
+  char* str = (char*) "guile";
+  if(name)
+    strncpy(name, str, len);
+  return str;
+}
+
+EXPORTABLE(int) eval (char *const string)
+{
+  scm_c_eval_string (string);
+  return 0;
+}
+
+EXPORTABLE(int) load (void* server,void* parser)
+{
+  return 0;
+}
+
+EXPORTABLE(int) postLoad (void* server,void* parser)
+{
+  return 0;
+}
+
+EXPORTABLE(int) unLoad (void* parser)
+{
+  return 0;
+}
diff --git a/plugins/src/guile/plugin.xml b/plugins/src/guile/plugin.xml
new file mode 100644
index 0000000..a5452bf
--- /dev/null
+++ b/plugins/src/guile/plugin.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<PLUGIN min-version="0.9" max-version="0.10">
+  <NAME>guile</NAME>
+  <VERSION>0.1</VERSION>
+  <AUTHOR>The Free Software Foundation Inc.</AUTHOR>
+  <MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
+  <DESCRIPTION>This plugin enables the guile interpreter</DESCRIPTION>
+</PLUGIN>

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/plugin/plugin.h                   |   11 +-
 myserver/src/plugin/plugin.cpp                     |   15 +-
 myserver/src/plugin/plugins_manager.cpp            |    2 +-
 myserver/tests/test_plugins_manager.cpp            |    9 +-
 plugins/src/{rules_checker => guile}/SConscript    |    8 +-
 .../src/guile/guile.cpp                            |   36 +-
 plugins/src/guile/plugin.xml                       |    9 +
 plugins/src/http_checker/http_checker.cpp          |    7 +-
 plugins/src/mime_magic/mime_magic.cpp              |   27 +-
 plugins/src/php/php.h                              |    7 +-
 plugins/src/python/python.cpp                      |  175 ++++----
 plugins/src/python/python.h                        |   70 ++--
 .../python_http_handler/python_http_handler.cpp    |  468 ++++++++++----------
 plugins/src/rules_checker/rules_checker.cpp        |   16 +-
 14 files changed, 413 insertions(+), 447 deletions(-)
 copy plugins/src/{rules_checker => guile}/SConscript (60%)
 copy myserver/src/protocol/http/dyn_http_manager.cpp => plugins/src/guile/guile.cpp (60%)
 create mode 100644 plugins/src/guile/plugin.xml


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Feb 23 16:37:47 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nk2Rv-0000hD-4x
	for mharc-myserver-commit@gnu.org; Tue, 23 Feb 2010 16:37:47 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nk2Ru-0000h5-6O
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 16:37:46 -0500
Received: from [140.186.70.92] (port=60244 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nk2Rs-0000gP-87
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 16:37:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nk2Rq-00055i-64
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 16:37:44 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:43947
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nk2Rq-00055Z-2r
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 16:37:42 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nk2Ro-0006sV-TY
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 21:37:40 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nk2Ro-0006N3-3E
	for myserver-commit@gnu.org; Tue, 23 Feb 2010 21:37:40 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ef4da49b38d71a122baf5e3540fb5b5a611f2f37
X-Git-Newrev: a696600be1a0362983b50bfe89ac9130996c6431
Message-Id: <E1Nk2Ro-0006N3-3E@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 23 Feb 2010 21:37:40 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-36-ga696600
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Feb 2010 21:37:46 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  a696600be1a0362983b50bfe89ac9130996c6431 (commit)
      from  ef4da49b38d71a122baf5e3540fb5b5a611f2f37 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit a696600be1a0362983b50bfe89ac9130996c6431
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Feb 23 22:37:16 2010 +0100

    Filter::getName does not accept parameters now.

diff --git a/myserver/include/filter/filter.h b/myserver/include/filter/filter.h
index faa6858..b920a19 100644
--- a/myserver/include/filter/filter.h
+++ b/myserver/include/filter/filter.h
@@ -42,7 +42,7 @@ public:
   virtual int write (const char* buffer, u_long len, u_long*);
   virtual int flush (u_long*);
   virtual int modifyData ();
-  virtual const char* getName (char*, u_long);
+  virtual const char* getName ();
   void setParent (Stream*);
   Stream* getParent ();
   Filter ();
diff --git a/myserver/include/filter/gzip/gzip.h b/myserver/include/filter/gzip/gzip.h
index 1d678fe..1aa66c7 100644
--- a/myserver/include/filter/gzip/gzip.h
+++ b/myserver/include/filter/gzip/gzip.h
@@ -68,7 +68,7 @@ public:
   virtual int write (const char* buffer, u_long len, u_long*);
   virtual int flush (u_long*);
   virtual int modifyData ();
-  virtual const char* getName (char* name, u_long len);
+  virtual const char* getName ();
 private:
   int active;
   GzipData data;
diff --git a/myserver/include/filter/gzip/gzip_decompress.h b/myserver/include/filter/gzip/gzip_decompress.h
index 9cfe031..18e53b8 100644
--- a/myserver/include/filter/gzip/gzip_decompress.h
+++ b/myserver/include/filter/gzip/gzip_decompress.h
@@ -67,7 +67,7 @@ public:
   virtual int write (const char* buffer, u_long len, u_long*);
   virtual int flush (u_long*);
   virtual int modifyData ();
-  virtual const char* getName (char* name, u_long len);
+  virtual const char* getName ();
 private:
   int active;
   GzipData data;
diff --git a/myserver/src/filter/filter.cpp b/myserver/src/filter/filter.cpp
index 16713bb..6f63f01 100644
--- a/myserver/src/filter/filter.cpp
+++ b/myserver/src/filter/filter.cpp
@@ -127,15 +127,9 @@ int Filter::modifyData ()
 
 /*!
  * Return a string with the filter name.
- * If an external buffer is provided write the name there too.
- * \param name The buffer where write the filter name.
- * \param len The buffer length.
  */
-const char* Filter::getName (char* name, u_long len)
+const char* Filter::getName ()
 {
   /* No name by default.  */
-  if (name)
-    name[0] = '\0';
-
-  return "\0";
+  return "";
 }
diff --git a/myserver/src/filter/filters_chain.cpp b/myserver/src/filter/filters_chain.cpp
index f8ae4be..e657f6d 100644
--- a/myserver/src/filter/filters_chain.cpp
+++ b/myserver/src/filter/filters_chain.cpp
@@ -234,7 +234,7 @@ int FiltersChain::isFilterPresent (const char* name)
   list<Filter*>::iterator i = filters.begin ();
 
   for ( ; i != filters.end (); ++i )
-    if (! strcasecmp ((*i)->getName (0, 0), name))
+    if (! strcasecmp ((*i)->getName (), name))
       return 1;
   return 0;
 }
@@ -340,7 +340,7 @@ void FiltersChain::getName (string& out)
   {
     if (i != filters.end () && (*i)->modifyData ())
     {
-      const char* name = (*i)->getName (0, 0);
+      const char* name = (*i)->getName ();
       if (name)
         out.append (name);
     }
@@ -359,6 +359,6 @@ FiltersChain::getFilters ()
   list<Filter*>::iterator it;
   list<string> filters;
   for (it = this->filters.begin (); it != this->filters.end (); it++)
-    filters.push_back (string ((*it)->getName (0, 0)));
+    filters.push_back (string ((*it)->getName ()));
   return filters;
 }
diff --git a/myserver/src/filter/gzip/gzip.cpp b/myserver/src/filter/gzip/gzip.cpp
index da118f9..50b6d21 100644
--- a/myserver/src/filter/gzip/gzip.cpp
+++ b/myserver/src/filter/gzip/gzip.cpp
@@ -363,16 +363,9 @@ Filter* Gzip::factory (const char* name)
 
 /*!
  * Return a string with the filter name.
- * If an external buffer is provided write the name there too.
- * \param name Buffer where write the filter name.
- * \param len Buffer size.
  */
-const char* Gzip::getName (char* name, u_long len)
+const char* Gzip::getName ()
 {
-  /*! No name by default. */
-  if (name)
-    myserver_strlcpy (name, "gzip", len);
-
   return "gzip";
 }
 
diff --git a/myserver/src/filter/gzip/gzip_decompress.cpp b/myserver/src/filter/gzip/gzip_decompress.cpp
index 010150a..80d6c3e 100644
--- a/myserver/src/filter/gzip/gzip_decompress.cpp
+++ b/myserver/src/filter/gzip/gzip_decompress.cpp
@@ -318,12 +318,8 @@ Filter* GzipDecompress::factory (const char* name)
  * \param name Buffer where write the filter name.
  * \param len Buffer size.
  */
-const char* GzipDecompress::getName (char* name, u_long len)
+const char* GzipDecompress::getName ()
 {
-  /*! No name by default. */
-  if (name)
-    myserver_strlcpy (name, "gzip", len);
-
   return "gzip";
 }
 
diff --git a/myserver/tests/test_filter_chain.cpp b/myserver/tests/test_filter_chain.cpp
index 7ca30a2..adef724 100644
--- a/myserver/tests/test_filter_chain.cpp
+++ b/myserver/tests/test_filter_chain.cpp
@@ -123,23 +123,21 @@ public:
     u_long nbw;
     Filter* filter = Gzip::factory ("GzipFilter");
     MemBuf mb;
-    char name[32];
     MemoryStream ms (&mb);
 
     fc->setStream (&ms);
 
     CPPUNIT_ASSERT_EQUAL (fc->isFilterPresent (filter), 0);
-    CPPUNIT_ASSERT_EQUAL (fc->isFilterPresent (filter->getName (name, 32)), 0);
+    CPPUNIT_ASSERT_EQUAL (fc->isFilterPresent (filter->getName ()), 0);
 
     fc->addFilter (filter, &nbw);
 
     CPPUNIT_ASSERT (fc->isFilterPresent (filter) != 0);
-    CPPUNIT_ASSERT (fc->isFilterPresent (filter->getName (name, 32)) != 0);
+    CPPUNIT_ASSERT (fc->isFilterPresent (filter->getName ()) != 0);
   }
 
   void testRemoveFilter ()
   {
-    char name[32];
     MemBuf mb;
     u_long nbw;
     Filter* filter = Gzip::factory ("GzipFilter");
@@ -150,12 +148,12 @@ public:
     fc->addFilter (filter, &nbw);
 
     CPPUNIT_ASSERT (fc->isFilterPresent (filter) != 0);
-    CPPUNIT_ASSERT (fc->isFilterPresent (filter->getName (name, 32)) != 0);
+    CPPUNIT_ASSERT (fc->isFilterPresent (filter->getName ()) != 0);
 
     fc->removeFilter (filter);
 
     CPPUNIT_ASSERT_EQUAL (fc->isFilterPresent (filter), 0);
-    CPPUNIT_ASSERT_EQUAL (fc->isFilterPresent (filter->getName (name, 32)), 0);
+    CPPUNIT_ASSERT_EQUAL (fc->isFilterPresent (filter->getName ()), 0);
   }
 
 };

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/filter/filter.h               |    2 +-
 myserver/include/filter/gzip/gzip.h            |    2 +-
 myserver/include/filter/gzip/gzip_decompress.h |    2 +-
 myserver/src/filter/filter.cpp                 |   10 ++--------
 myserver/src/filter/filters_chain.cpp          |    6 +++---
 myserver/src/filter/gzip/gzip.cpp              |    9 +--------
 myserver/src/filter/gzip/gzip_decompress.cpp   |    6 +-----
 myserver/tests/test_filter_chain.cpp           |   10 ++++------
 8 files changed, 14 insertions(+), 33 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 24 04:58:02 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NkE0I-00009W-Eb
	for mharc-myserver-commit@gnu.org; Wed, 24 Feb 2010 04:58:02 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NkE0E-00008a-Mk
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 04:57:58 -0500
Received: from [140.186.70.92] (port=54055 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NkE0B-00007i-QG
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 04:57:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkE0A-0005oL-46
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 04:57:55 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:56307
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkE09-0005oA-VT
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 04:57:54 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkE08-0007Gd-Up
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 09:57:52 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NkE07-00032r-D9
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 09:57:52 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a696600be1a0362983b50bfe89ac9130996c6431
X-Git-Newrev: 26881c43ea7825c70b4d4fc63fe52bcdd1d7c20a
Message-Id: <E1NkE07-00032r-D9@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 24 Feb 2010 09:57:51 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-40-g26881c4
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Feb 2010 09:57:59 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  26881c43ea7825c70b4d4fc63fe52bcdd1d7c20a (commit)
       via  2190c0f3fbafb79ace2d9b74cf88e92d8c31e1a0 (commit)
       via  eef335db6c37ccda072d402f7c9f4d3c3a08f65e (commit)
       via  c9a4497f2ca4bdf58b461eb92bd7a22f7e22c4db (commit)
      from  a696600be1a0362983b50bfe89ac9130996c6431 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 26881c43ea7825c70b4d4fc63fe52bcdd1d7c20a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 10:57:01 2010 +0100

    Make `genMainConf' a function pointer.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 8d0e957..bc8d5ab 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -349,7 +349,7 @@ int loadConfFilesLocation (string &mainConfigurationFile,
   return 0;
 }
 
-static MainConfiguration *genMainConf (Server *server, const char *arg)
+static MainConfiguration *_genMainConf (Server *server, const char *arg)
 {
   XmlMainConfiguration *conf = new XmlMainConfiguration ();
   if (conf->open (arg))
@@ -360,6 +360,8 @@ static MainConfiguration *genMainConf (Server *server, const char *arg)
   return conf;
 }
 
+MainConfiguration* (*genMainConf) (Server *server, const char *arg) = &_genMainConf;
+
 const char *program_name = NULL;
 
 int main (int argn, char **argv)
@@ -525,7 +527,7 @@ int main (int argn, char **argv)
             return 1;
 #endif
         case MYSERVER_RUNAS_CONSOLE:
-          consoleService (mainConf, mimeConf, vhostConf, externPath, &genMainConf);
+          consoleService (mainConf, mimeConf, vhostConf, externPath, genMainConf);
         }
     }
   catch (...)



commit 2190c0f3fbafb79ace2d9b74cf88e92d8c31e1a0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 10:56:39 2010 +0100

    The `PluginsManager' class invokes `load' and `unLoad' for active plugins.

diff --git a/myserver/src/plugin/plugin.cpp b/myserver/src/plugin/plugin.cpp
index 0c4310a..19f96dd 100644
--- a/myserver/src/plugin/plugin.cpp
+++ b/myserver/src/plugin/plugin.cpp
@@ -80,7 +80,7 @@ int Plugin::postLoad (Server* server)
 {
   if (hinstLib.validHandle ())
     {
-      postLoadPROC proc = (postLoadPROC)hinstLib.getProc ("postLoad");
+      postLoadPROC proc = (postLoadPROC) hinstLib.getProc ("postLoad");
       if (proc)
         return proc (server);
     }
@@ -97,7 +97,7 @@ int Plugin::unLoad ()
 {
   if (hinstLib.validHandle ())
     {
-      unLoadPROC proc = (unLoadPROC)hinstLib.getProc ("unLoad");
+      unLoadPROC proc = (unLoadPROC) hinstLib.getProc ("unLoad");
       if (proc)
         return proc ();
     }
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 6da2ebb..55a6e63 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -644,8 +644,13 @@ PluginsManager::load (Server *server)
       if (*rIt)
         removePlugin (name);
     }
-  return 0;
 
+  for (it = pluginsInfos.begin (); it != pluginsInfos.end (); it++)
+    {
+      (*it)->getPlugin ()->load (server);
+    }
+
+  return 0;
 }
 
 /*!
@@ -682,6 +687,7 @@ PluginsManager::unLoad ()
 
   while (poit != pluginsInfos.end ())
     {
+      (*poit)->getPlugin ()->unLoad ();
       delete *poit;
       poit++;
     }



commit eef335db6c37ccda072d402f7c9f4d3c3a08f65e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 10:47:13 2010 +0100

    unLoad does not accept any argument, update plugins accordingly

diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index ffc897a..74a5789 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -38,7 +38,7 @@ EXPORTABLE(int) postLoad (void* server, void* parser)
   return 0;
 }
 
-EXPORTABLE(int) unLoad (void* parser)
+EXPORTABLE(int) unLoad ()
 {
   return 0;
 }
diff --git a/plugins/src/hello/hello.cpp b/plugins/src/hello/hello.cpp
index e2e4dc4..702bcf4 100644
--- a/plugins/src/hello/hello.cpp
+++ b/plugins/src/hello/hello.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2009, 2010 The Free Software Foundation Inc.
+  Copyright (C) 2010 The Free Software Foundation Inc.
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
@@ -18,7 +18,6 @@
 
 #include <include/plugin/plugin.h>
 
-
 PLUGIN_NAME ("hello");
 
 EXPORTABLE(int) load (void* server, void* parser)
@@ -33,7 +32,7 @@ EXPORTABLE(int) postLoad (void* server, void* parser)
   return 0;
 }
 
-EXPORTABLE(int) unLoad (void* parser)
+EXPORTABLE(int) unLoad ()
 {
   printf ("unLoad: bye world!\n");
   return 0;
diff --git a/plugins/src/http_checker/http_checker.cpp b/plugins/src/http_checker/http_checker.cpp
index 915907f..b3d1710 100644
--- a/plugins/src/http_checker/http_checker.cpp
+++ b/plugins/src/http_checker/http_checker.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2007, 2009 The Free Software Foundation Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2007, 2009, 2010 The Free Software Foundation Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include <myserver.h>
 
@@ -120,7 +120,7 @@ static PyObject *raise_error(PyObject *self, PyObject *args)
 
   ThreadData* data = getThreadData();
 
-  if(data->ret)
+  if (data->ret)
     return NULL;
 
   data->td->http->raiseHTTPError(error);
@@ -138,7 +138,7 @@ static PyObject *send_redirect(PyObject *self, PyObject *args)
 
   ThreadData* data = getThreadData();
 
-  if(data->ret)
+  if (data->ret)
     return NULL;
 
   data->td->http->sendHTTPRedirect(dest);
@@ -182,9 +182,9 @@ public:
 
     init((char*)"http_checker", httpCheckerMethods);
 
-    for(it = rules.begin(); it != rules.end(); it++)
+    for (it = rules.begin(); it != rules.end(); it++)
       {
-	if((*it).file) 
+	if ((*it).file) 
 	  {
 	    executeFromFilePROC execute = ((executeFromFilePROC)python->getDirectMethod((char*)"executeFromFile"));
 	    if (execute)
@@ -200,7 +200,7 @@ public:
     return threadData.ret;
   }
 
-  void addRule(const char* rule, bool file)
+  void addRule (const char* rule, bool file)
   {
     Item it;
     it.data.assign(rule);
@@ -220,7 +220,7 @@ static HttpObserver observer;
 EXPORTABLE(char*) name(char* name, u_long len)
 {
   char* str = (char*)"http_checker";
-  if(name)
+  if (name)
     strncpy(name, str, len);
   return str;
 }
@@ -235,7 +235,7 @@ EXPORTABLE(int) load(void* server,void* parser)
   xmlDocPtr xmlDoc;
 
   python = serverInstance->getPluginsManager()->getPlugin(pythonName);
-  if(!python)
+  if (!python)
     {
       serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: cannot find executors::python"));
       return -1;
@@ -248,30 +248,30 @@ EXPORTABLE(int) load(void* server,void* parser)
 
   init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
 
-  if(!init)
+  if (!init)
     {
       serverInstance->log (MYSERVER_LOG_MSG_ERROR,
-         _("HttpChecker: cannot find method initModule in executors::python"));
+                           _("HttpChecker: cannot find method initModule in executors::python"));
       return -1;
     }
 
   configuration = serverInstance->getConfiguration ();
 
   /* FIXME: DON'T DO THIS.  */
-  xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
+  xmlDoc = ((XmlMainConfiguration *) configuration)->getDoc ();
 
-  for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
+  for (xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
     {
-      if(!xmlStrcmp(ptr->name, (const xmlChar *)"HTTP_CHECKER_RULE"))
+      if (!xmlStrcmp (ptr->name, (const xmlChar *)"HTTP_CHECKER_RULE"))
 	{
 	  bool file = false;
 	  xmlAttrPtr properties = ptr->properties;
 	  char* data = 0;
-	  while(properties)
+	  while (properties)
 	    {
-	      if(!xmlStrcmp(properties->name, (const xmlChar *)"file"))
+	      if (!xmlStrcmp (properties->name, (const xmlChar *)"file"))
 		{
-		  if(properties->children && properties->children->content)
+		  if (properties->children && properties->children->content)
 		    data = (char*)properties->children->content;
 
 		  file = true;
@@ -279,16 +279,16 @@ EXPORTABLE(int) load(void* server,void* parser)
 	      properties = properties->next;
 	    }
 
-	  if(!file && ptr->children && ptr->children->next && ptr->children->next->content)
+	  if (!file && ptr->children && ptr->children->next && ptr->children->next->content)
 	    data = (char*)ptr->children->next->content;
 
-	  if(!data)
+	  if (!data)
 	    {
-        serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: invalid rule"));
+              serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: invalid rule"));
 	      return -1;
 	    }
 
-	  observer.addRule(data, file);
+	  observer.addRule (data, file);
 	}
 
     }
@@ -297,11 +297,11 @@ EXPORTABLE(int) load(void* server,void* parser)
 
   return 0;
 }
-EXPORTABLE(int) postLoad(void* server,void* parser)
+EXPORTABLE(int) postLoad (void* server,void* parser)
 {
   return 0;
 }
-EXPORTABLE(int) unLoad(void* parser)
+EXPORTABLE(int) unLoad ()
 {
   mutex.destroy();
   return 0;
diff --git a/plugins/src/php/php.cpp b/plugins/src/php/php.cpp
index 1e64904..d47514c 100644
--- a/plugins/src/php/php.cpp
+++ b/plugins/src/php/php.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2007, 2009 The Free Software Foundation Inc.
+  Copyright (C) 2007, 2009, 2010 The Free Software Foundation Inc.
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
@@ -14,6 +14,7 @@
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+
 #include "php.h"
 #include <include/base/thread/thread.h>
 #include <include/base/sync/mutex.h>
@@ -40,16 +41,16 @@ int singleRequest;
 
 struct PhpData
 {
-	HttpThreadContext* td;
-	bool keepalive;
-	bool useChunks;
-	bool headerSent;
-	FiltersChain chain;
+  HttpThreadContext* td;
+  bool keepalive;
+  bool useChunks;
+  bool headerSent;
+  FiltersChain chain;
 };
 
 extern "C" void addModule(zend_module_entry entry)
 {
-	entries[loadedEntries++] = entry;
+  entries[loadedEntries++] = entry;
 }
 
 
@@ -58,16 +59,16 @@ static PhpData* getPhpData()
 #ifdef ZTS
   void*** tsrm_ls = (void***)ts_resource(0);
 #endif
-	return (PhpData*)SG(server_context);
+  return (PhpData*)SG(server_context);
 }
 
 int modifyHeader(HttpResponseHeader *response, char* name, char* value)
 {
-	string* val = response->getValue(name, NULL);
+  string* val = response->getValue(name, NULL);
 
-	if(val)
-		val->assign(value);
-	else
+  if(val)
+    val->assign(value);
+  else
     {
       string field(name);
       string valString(value);
@@ -76,46 +77,46 @@ int modifyHeader(HttpResponseHeader *response, char* name, char* value)
 
       response->other.put(field, entry);
     }
-	return 0;
+  return 0;
 }
 
 int sendHeader(PhpData* data)
 {
-	char* buffer;
-	string* location = 0;
-	if(data->headerSent || data->td->appendOutputs)
-		return 0;
-	buffer = data->td->buffer2->getBuffer();
+  char* buffer;
+  string* location = 0;
+  if(data->headerSent || data->td->appendOutputs)
+    return 0;
+  buffer = data->td->buffer2->getBuffer();
 
-	if(data->keepalive)
-		modifyHeader(&(data->td->response), "Connection", "keep-alive");
-	else
-		modifyHeader(&(data->td->response), "Connection", "closed");
+  if(data->keepalive)
+    modifyHeader(&(data->td->response), "Connection", "keep-alive");
+  else
+    modifyHeader(&(data->td->response), "Connection", "closed");
 
-	if(data->useChunks)
-		modifyHeader(&(data->td->response), "Transfer-Encoding", "chunked");
+  if(data->useChunks)
+    modifyHeader(&(data->td->response), "Transfer-Encoding", "chunked");
 
-	HttpHeaders::buildHTTPResponseHeader(buffer,
-																			 &data->td->response);
+  HttpHeaders::buildHTTPResponseHeader(buffer,
+                                       &data->td->response);
 
 
 
-	location = data->td->response.getValue("Location", 0);
+  location = data->td->response.getValue("Location", 0);
 
-	/*
-	 *If it is present Location: xxx in the header
-	 *send a redirect to xxx.
-	 */
-	if(location && location->length())
+  /*
+   *If it is present Location: xxx in the header
+   *send a redirect to xxx.
+   */
+  if(location && location->length())
     {
       data->td->http->sendHTTPRedirect(location->c_str());
       return 0;
     }
 
-	data->headerSent = true;
-	return data->td->connection->socket->send( buffer,
-																						 static_cast<int>(strlen(buffer)),
-																						 0) != SOCKET_ERROR;
+  data->headerSent = true;
+  return data->td->connection->socket->send( buffer,
+                                             static_cast<int>(strlen(buffer)),
+                                             0) != SOCKET_ERROR;
 
 
 
@@ -125,82 +126,82 @@ int sendHeader(PhpData* data)
 int myphp_header_handler(sapi_header_struct *sapi_header,
                          sapi_headers_struct *sapi_headers TSRMLS_DC)
 {
-	PhpData* data = getPhpData();
-	char* valInit;
-	int sep;
-	for(sep = 0; sapi_header->header[sep] != ':'; sep++)
-		if(!sapi_header->header[sep])
-			return 1;
+  PhpData* data = getPhpData();
+  char* valInit;
+  int sep;
+  for(sep = 0; sapi_header->header[sep] != ':'; sep++)
+    if(!sapi_header->header[sep])
+      return 1;
 
-	sapi_header->header[sep] = 0;
+  sapi_header->header[sep] = 0;
 
-	valInit = sapi_header->header + sep + 1;
-	if(*valInit == ' ')
-		valInit++;
+  valInit = sapi_header->header + sep + 1;
+  if(*valInit == ' ')
+    valInit++;
 
-	modifyHeader(&(data->td->response), sapi_header->header, valInit);
+  modifyHeader(&(data->td->response), sapi_header->header, valInit);
 
-	sapi_header->header[sep] = ':';
+  sapi_header->header[sep] = ':';
 
-	return 0;
+  return 0;
 }
 
 int myphp_read_post(char *buffer, uint count_bytes TSRMLS_DC)
 {
-	PhpData* data = getPhpData();
-	u_long nbr = 0;
+  PhpData* data = getPhpData();
+  u_long nbr = 0;
 
-	if(data->td->inputData.getHandle() != -1 && data->td->inputData.getFileSize())
-		if(data->td->inputData.readFromFile(buffer, count_bytes, &nbr))
-			nbr = 0;
+  if(data->td->inputData.getHandle() != -1 && data->td->inputData.getFileSize())
+    if(data->td->inputData.readFromFile(buffer, count_bytes, &nbr))
+      nbr = 0;
 
-	return nbr;
+  return nbr;
 
 }
 
 int myphp_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
 {
-	return sendHeader(getPhpData());
+  return sendHeader(getPhpData());
 }
 
 char *myphp_read_cookies(TSRMLS_D)
 {
-	PhpData* data = getPhpData();
-	string *cookies = data->td->request.getValue("Cookie", NULL);
+  PhpData* data = getPhpData();
+  string *cookies = data->td->request.getValue("Cookie", NULL);
 
-	if(cookies)
-		return (char*)cookies->c_str();
+  if(cookies)
+    return (char*)cookies->c_str();
 
-	return 0;
+  return 0;
 }
 
 void myphp_log_message(char* message)
 {
-	PhpData* data = getPhpData();
-	data->td->connection->host->warningsLogRequestAccess(data->td->id);
-	data->td->connection->host->warningsLogWrite(message);
-	data->td->connection->host->warningsLogRequestAccess(data->td->id);
+  PhpData* data = getPhpData();
+  data->td->connection->host->warningsLogRequestAccess(data->td->id);
+  data->td->connection->host->warningsLogWrite(message);
+  data->td->connection->host->warningsLogRequestAccess(data->td->id);
 
 }
 
 int myphp_ub_write(const char *str, unsigned int str_length TSRMLS_DC)
 {
-	PhpData* data = getPhpData();
+  PhpData* data = getPhpData();
 
-	if(!data->headerSent)
-		if(sendHeader(data))
-			return 1;
+  if(!data->headerSent)
+    if(sendHeader(data))
+      return 1;
 
 
-	data->chain.setStream(data->td->connection->socket);
-	data->td->sentData += (u_long)str_length;
-	return HttpDataHandler::appendDataToHTTPChannel(data->td,
-																									(char*)str,
-																									(u_long)str_length,
-																									&(data->td->outputData),
-																									&(data->chain),
-																									(bool)data->td->appendOutputs,
-																									data->useChunks);
+  data->chain.setStream(data->td->connection->socket);
+  data->td->sentData += (u_long)str_length;
+  return HttpDataHandler::appendDataToHTTPChannel(data->td,
+                                                  (char*)str,
+                                                  (u_long)str_length,
+                                                  &(data->td->outputData),
+                                                  &(data->chain),
+                                                  (bool)data->td->appendOutputs,
+                                                  data->useChunks);
 
 
 }
@@ -214,23 +215,23 @@ void myphp_flush(void *server_context)
 extern "C"
 char* name(char* name, u_long len)
 {
-	char* str = "php";
+  char* str = "php";
 
-	if(name)
-		strncpy(name, str, len);
+  if(name)
+    strncpy(name, str, len);
 
-	return str;
+  return str;
 }
 
 void myphp_register_variables(zval *track_vars_array TSRMLS_DC)
 {
-	PhpData* data = getPhpData();
-	char* ptr;
-	Cgi::buildCGIEnvironmentString(data->td, data->td->buffer->getBuffer());
+  PhpData* data = getPhpData();
+  char* ptr;
+  Cgi::buildCGIEnvironmentString(data->td, data->td->buffer->getBuffer());
 
-	ptr = data->td->buffer->getBuffer();
+  ptr = data->td->buffer->getBuffer();
 
-	while(ptr)
+  while(ptr)
     {
       char* name = ptr;
       char* value = strchr(name, '=') + 1;
@@ -246,20 +247,20 @@ void myphp_register_variables(zval *track_vars_array TSRMLS_DC)
       value[-1] = '=';
 
     }
-	php_register_variable("env", (char*)data->td->request.uriOpts.c_str(),
+  php_register_variable("env", (char*)data->td->request.uriOpts.c_str(),
                         track_vars_array TSRMLS_CC);
-	php_register_variable("PHP_SELF", (char*)data->td->request.uri.c_str(),
+  php_register_variable("PHP_SELF", (char*)data->td->request.uri.c_str(),
                         track_vars_array TSRMLS_CC);
 }
 
 int	myphp_startup(struct _sapi_module_struct *sapi_module)
 {
-	if(php_module_startup(sapi_module, entries, loadedEntries) == FAILURE)
+  if(php_module_startup(sapi_module, entries, loadedEntries) == FAILURE)
     {
       return FAILURE;
     }
 
-	return 0;
+  return 0;
 }
 
 static sapi_module_struct myphp_module =
@@ -293,13 +294,14 @@ static sapi_module_struct myphp_module =
     STANDARD_SAPI_MODULE_PROPERTIES
   };
 
-int load(void* server)
+EXPORTABLE(int)
+load(void* server)
 {
-	::server = (Server*)server;
-	const char *data;
-	data = ::server->getData("PHP_NO_REBOOT");
+  ::server = (Server*)server;
+  const char *data;
+  data = ::server->getData("PHP_NO_REBOOT");
 
-	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
+  if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
     {
       data = ::server->getData("PHP_SAFE_MODE");
 
@@ -313,17 +315,17 @@ int load(void* server)
       if(singleRequest)
         requestMutex.init();
     }
-	return 0;
+  return 0;
 }
 
 /*! Postload phase for the plugin.  */
-extern "C"
-int postLoad(void* server)
+EXPORTABLE(int)
+postLoad(void* server)
 {
-	const char *data;
-	data = ::server->getData("PHP_NO_REBOOT");
+  const char *data;
+  data = ::server->getData("PHP_NO_REBOOT");
 
-	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
+  if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
     {
 #ifdef ZTS
       tsrm_startup(((Server*)server)->getMaxThreads(), 1, 0, NULL);
@@ -332,17 +334,17 @@ int postLoad(void* server)
       sapi_startup(&myphp_module);
       myphp_module.startup(&myphp_module);
     }
-	return 0;
+  return 0;
 }
 
 /*! Unload the plugin.  Called once.  Returns 0 on success.  */
-extern "C"
-int unLoad(void* p)
+EXPORTABLE(int)
+unLoad()
 {
-	const char *data;
-	data = ::server->getData("PHP_NO_REBOOT");
+  const char *data;
+  data = ::server->getData("PHP_NO_REBOOT");
 
-	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
+  if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
     {
       myphp_module.shutdown(&myphp_module);
 
@@ -357,7 +359,7 @@ int unLoad(void* p)
 
       loadedEntries = 0;
     }
-	return 0;
+  return 0;
 }
 
 
@@ -382,78 +384,78 @@ int
 PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
                  const char* cgi, int selfExecuted, int onlyHeader = 0)
 {
-	PhpData* data;
-	zend_file_handle script;
-	int ret = SUCCESS;
-	HttpRequestHeader *req = &(td->request);
+  PhpData* data;
+  zend_file_handle script;
+  int ret = SUCCESS;
+  HttpRequestHeader *req = &(td->request);
 
-	if(singleRequest)
-		requestMutex.lock();
+  if(singleRequest)
+    requestMutex.lock();
 
-	TSRMLS_FETCH();
+  TSRMLS_FETCH();
 
-	td->inputData.setFilePointer(0);
+  td->inputData.setFilePointer(0);
 
 
-	SG(headers_sent) = 0;
-	SG(request_info).no_headers = 1;
-	SG(request_info).headers_only = onlyHeader;
+  SG(headers_sent) = 0;
+  SG(request_info).no_headers = 1;
+  SG(request_info).headers_only = onlyHeader;
 
-	SG(request_info).request_uri = (char*)req->uri.c_str();
-	SG(request_info).request_method = req->cmd.c_str();
+  SG(request_info).request_uri = (char*)req->uri.c_str();
+  SG(request_info).request_method = req->cmd.c_str();
 
-	if(!req->ver.compare("HTTP/1.1") || !req->ver.compare("HTTPS/1.1"))
-		SG(request_info).proto_num = 1001;
-	else
-		SG(request_info).proto_num = 1000;
+  if(!req->ver.compare("HTTP/1.1") || !req->ver.compare("HTTPS/1.1"))
+    SG(request_info).proto_num = 1001;
+  else
+    SG(request_info).proto_num = 1000;
 
-	SG(server_context) = data = new PhpData();
+  SG(server_context) = data = new PhpData();
 
-	data->td = td;
-	HttpDataHandler::checkDataChunks(td, &data->keepalive, &data->useChunks);
-	data->headerSent = false;
+  data->td = td;
+  HttpDataHandler::checkDataChunks(td, &data->keepalive, &data->useChunks);
+  data->headerSent = false;
 
 
-	SG(sapi_headers).http_response_code = 200;
+  SG(sapi_headers).http_response_code = 200;
 
-	SG(request_info).query_string =  (char*)req->uriOpts.c_str();
+  SG(request_info).query_string =  (char*)req->uriOpts.c_str();
 
-	SG(request_info).path_translated = (char*)filenamePath;
+  SG(request_info).path_translated = (char*)filenamePath;
 
-	if(td->connection->getLogin()[0])
-		SG(request_info).auth_user = (char*)td->connection->getLogin();
+  if(td->connection->getLogin()[0])
+    SG(request_info).auth_user = (char*)td->connection->getLogin();
 
-	if(td->connection->getPassword()[0])
-		SG(request_info).auth_password = (char*)td->connection->getPassword();
+  if(td->connection->getPassword()[0])
+    SG(request_info).auth_password = (char*)td->connection->getPassword();
 
-	if(req->getValue("Content-Type", NULL))
-		SG(request_info).content_type = req->getValue("Content-Type", NULL)->c_str();
+  if(req->getValue("Content-Type", NULL))
+    SG(request_info).content_type = req->getValue("Content-Type", NULL)->c_str();
 
-	SG(request_info).content_length = atoi(req->contentLength.c_str());
+  SG(request_info).content_length = atoi(req->contentLength.c_str());
 
-	//SG(options) |= SAPI_OPTION_NO_CHDIR;
+  //SG(options) |= SAPI_OPTION_NO_CHDIR;
 
-	{
-		char limit[15];
-		char *name = "memory_limit";
- 		sprintf(limit, "%d", 1 << 30);
-		zend_alter_ini_entry(name, strlen(name), limit, strlen(limit),
+  {
+    char limit[15];
+    char *name = "memory_limit";
+    sprintf(limit, "%d", 1 << 30);
+    zend_alter_ini_entry(name, strlen(name), limit, strlen(limit),
                          PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
 
-		name = "html_errors";
-		zend_alter_ini_entry(name, strlen(name), "0", 1, PHP_INI_SYSTEM,
+    name = "html_errors";
+    zend_alter_ini_entry(name, strlen(name), "0", 1, PHP_INI_SYSTEM,
                          PHP_INI_STAGE_ACTIVATE);
 
-	}
+  }
 
-	SG(request_info).post_data_length = SG(request_info).content_length;
+  SG(request_info).post_data_length = SG(request_info).content_length;
 
-	script.type = ZEND_HANDLE_FILENAME;
-	script.filename = (char*)filenamePath;
-	script.opened_path = NULL;
-	script.free_filename = 0;
+  script.type = ZEND_HANDLE_FILENAME;
+  script.filename = (char*)filenamePath;
+  script.opened_path = NULL;
+  script.free_filename = 0;
 
-	zend_first_try
+  zend_first_try
     {
 
       if (php_request_startup(TSRMLS_C) == FAILURE)
@@ -464,9 +466,7 @@ PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
       php_execute_script(&script TSRMLS_CC);
 
       if(data->useChunks)
-        HttpDataHandler::appendDataToHTTPChannel(data->td,
-                                                 0,
-                                                 0,
+        HttpDataHandler::appendDataToHTTPChannel(data->td, 0, 0,
                                                  &(data->td->outputData),
                                                  &(data->chain),
                                                  (bool)data->td->appendOutputs,
@@ -476,14 +476,14 @@ PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
 
 
     }
-	zend_end_try();
+  zend_end_try();
 
 
-	if(singleRequest)
-		requestMutex.unlock();
+  if(singleRequest)
+    requestMutex.unlock();
 
 
-	delete data;
+  delete data;
 
-	return ret;
+  return ret;
 }
diff --git a/plugins/src/php/php.h b/plugins/src/php/php.h
index ab9753f..07e2b0e 100644
--- a/plugins/src/php/php.h
+++ b/plugins/src/php/php.h
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2007, 2008 The Free Software Foundation Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2007, 2008, 2010 The Free Software Foundation Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include <php_embed.h>
 
@@ -35,19 +35,19 @@ EXPORTABLE(int) load(void* server, void* parser);
 
 EXPORTABLE(int) postLoad(void* server,void* parser)
 
-EXPORTABLE(int) unload(void* p);
+EXPORTABLE(int) unLoad();
 
 class PhpManager 
 {
-public:
-	PhpManager();
-	virtual ~PhpManager();
-	virtual int send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
+ public:
+  PhpManager();
+  virtual ~PhpManager();
+  virtual int send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
                    const char* cgi, int selfExecuted, int onlyHeader = 0);
 
 };
 
 EXPORTABLE(int) sendManager(HttpThreadContext* td, ConnectionPtr s, const char *filenamePath,
-													 const char* cgi, int onlyHeader);
+                            const char* cgi, int onlyHeader);
 
 
diff --git a/plugins/src/python/python.cpp b/plugins/src/python/python.cpp
index 84b71d0..7e37ac4 100644
--- a/plugins/src/python/python.cpp
+++ b/plugins/src/python/python.cpp
@@ -78,7 +78,7 @@ int load (void* server)
 }
 
 /*! Unload the plugin.  Called once.  Returns 0 on success.  */
-int unLoad (void* p)
+int unLoad ()
 {
   PyInterpreterState *interpreter = NULL;
   PyThreadState *threadState = NULL;
@@ -100,13 +100,10 @@ int unLoad (void* p)
 
   PyThreadState_Swap (threadState);
 
-
   Py_Finalize ();
 
-
   PyThreadState_Swap (NULL);
 
-
   PyEval_ReleaseLock ();
 
   HashMap<ThreadID, PythonData*>::Iterator it = pythonThreadData.begin ();
diff --git a/plugins/src/python/python.h b/plugins/src/python/python.h
index 7c98348..2b7237b 100644
--- a/plugins/src/python/python.h
+++ b/plugins/src/python/python.h
@@ -37,7 +37,7 @@ struct PythonData
 extern HashMap<ThreadID, PythonData*> pythonThreadData;
 
 EXPORTABLE(int) load (void* server,void* parser);
-EXPORTABLE(int) unLoad (void* p);
+EXPORTABLE(int) unLoad ();
 
 
 EXPORTABLE(int) execute (char* code, u_long length);



commit c9a4497f2ca4bdf58b461eb92bd7a22f7e22c4db
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 10:27:37 2010 +0100

    Add a new `hello' plugin.

diff --git a/plugins/src/hello/SConscript b/plugins/src/hello/SConscript
new file mode 100644
index 0000000..11a4f8f
--- /dev/null
+++ b/plugins/src/hello/SConscript
@@ -0,0 +1,25 @@
+#-*- mode: python -*-
+Import('dest_dir','listinc')
+
+local_listinc=[
+      GetLaunchDir(),
+      '../../../',
+      '/usr/local/include',
+      '/usr/include/',
+      '/usr/local/include/guile',
+      '/usr/local/include/libxml2',
+      '/usr/include/libxml2',
+      '.'
+      ]
+
+local_listinc.extend(listinc)
+
+env = Environment(CPPPATH=local_listinc)
+
+conf = Configure(env, config_h="config.h")
+
+env = conf.Finish()
+
+env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/hello", ["hello.cpp" ], SHLIBPREFIX="")
+
+
diff --git a/plugins/src/hello/hello.cpp b/plugins/src/hello/hello.cpp
new file mode 100644
index 0000000..e2e4dc4
--- /dev/null
+++ b/plugins/src/hello/hello.cpp
@@ -0,0 +1,40 @@
+/*
+  MyServer
+  Copyright (C) 2009, 2010 The Free Software Foundation Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <myserver.h>
+
+#include <include/plugin/plugin.h>
+
+
+PLUGIN_NAME ("hello");
+
+EXPORTABLE(int) load (void* server, void* parser)
+{
+  printf ("load: hello world!\n");
+  return 0;
+}
+
+EXPORTABLE(int) postLoad (void* server, void* parser)
+{
+  printf ("postLoad: hello world!\n");
+  return 0;
+}
+
+EXPORTABLE(int) unLoad (void* parser)
+{
+  printf ("unLoad: bye world!\n");
+  return 0;
+}
diff --git a/plugins/src/hello/plugin.xml b/plugins/src/hello/plugin.xml
new file mode 100644
index 0000000..34fb9c6
--- /dev/null
+++ b/plugins/src/hello/plugin.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<PLUGIN min-version="0.9" max-version="0.10">
+  <NAME>hello</NAME>
+  <VERSION>0.1</VERSION>
+  <AUTHOR>The Free Software Foundation Inc.</AUTHOR>
+  <MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
+  <DESCRIPTION>This plugin produces a familiar greeting.  It can be used as a base for new plugins.</DESCRIPTION>
+</PLUGIN>

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp                        |    6 +-
 myserver/src/plugin/plugin.cpp                   |    4 +-
 myserver/src/plugin/plugins_manager.cpp          |    8 +-
 plugins/src/guile/guile.cpp                      |    2 +-
 plugins/src/{guile => hello}/SConscript          |    6 +-
 plugins/src/{guile/guile.cpp => hello/hello.cpp} |   17 +-
 plugins/src/{guile => hello}/plugin.xml          |    4 +-
 plugins/src/http_checker/http_checker.cpp        |   70 +++---
 plugins/src/php/php.cpp                          |  326 +++++++++++-----------
 plugins/src/php/php.h                            |   40 ++--
 plugins/src/python/python.cpp                    |    5 +-
 plugins/src/python/python.h                      |    2 +-
 12 files changed, 243 insertions(+), 247 deletions(-)
 copy plugins/src/{guile => hello}/SConscript (69%)
 copy plugins/src/{guile/guile.cpp => hello/hello.cpp} (78%)
 copy plugins/src/{guile => hello}/plugin.xml (61%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 24 11:57:37 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NkKYL-0007W2-RP
	for mharc-myserver-commit@gnu.org; Wed, 24 Feb 2010 11:57:37 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NkKYJ-0007Vb-JO
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 11:57:35 -0500
Received: from [140.186.70.92] (port=40866 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NkKYH-0007VS-5T
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 11:57:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkKYE-0003ic-1Y
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 11:57:32 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:57824
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkKYD-0003iV-Sx
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 11:57:30 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkKYD-0003sy-7e
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 16:57:29 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NkKY8-0003r5-Pf
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 16:57:29 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 26881c43ea7825c70b4d4fc63fe52bcdd1d7c20a
X-Git-Newrev: 01bfeea1ba67b0fb12599c7a8006416c3e8b8858
Message-Id: <E1NkKY8-0003r5-Pf@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 24 Feb 2010 16:57:25 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-46-g01bfeea
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Feb 2010 16:57:36 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  01bfeea1ba67b0fb12599c7a8006416c3e8b8858 (commit)
       via  66ea79c469ec99d751ceddcdaa31992b4b55e544 (commit)
       via  bf996fa6a7272272c36a4d1b00c1ffc33c80c5de (commit)
       via  00b0c5fe2065a63172ac1105f93076c6e9f8d1c6 (commit)
       via  9c95db4929b7f577ad91d9e49ab85584ecd03795 (commit)
       via  f7c3602b68c03c219a63689f73f43207a9633f1d (commit)
      from  26881c43ea7825c70b4d4fc63fe52bcdd1d7c20a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 01bfeea1ba67b0fb12599c7a8006416c3e8b8858
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 17:55:06 2010 +0100

    Add plugin `guile_conf'.

diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index 4d3d707..a2b03ea 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -22,16 +22,14 @@
 
 PLUGIN_NAME ("guile");
 
-EXPORTABLE(int) eval (char *const string)
+EXPORTABLE(SCM) eval (char *const string)
 {
-  scm_c_eval_string (string);
-  return 0;
+  return scm_c_eval_string (string);
 }
 
-EXPORTABLE(int) eval_file (char *const file)
+EXPORTABLE(SCM) eval_file (char *const file)
 {
-  gh_eval_file (file);
-  return 0;
+  return gh_eval_file (file);
 }
 
 EXPORTABLE(int) load (void* server)
diff --git a/plugins/src/guile_conf/README b/plugins/src/guile_conf/README
new file mode 100644
index 0000000..7c93035
--- /dev/null
+++ b/plugins/src/guile_conf/README
@@ -0,0 +1,20 @@
+This plugin enables to use a configuration file written in scheme.
+
+The plugin MUST be specified on the command line, before any
+configuration file is loaded:
+
+$ ./myserver  \
+  --plugins=guile_conf:../../plugins/bin/guile_conf/guile_conf.so 
+
+
+It looks for the `configuration' symbol in the `myserver.sch' file.
+The configuration looks like:
+
+A node can have an arbitrary number of attributes, and they are
+specified as a list of cons cells, the remaining non-cons cells
+contain the children of the node or the value.
+
+  (define configuration 
+    '(((name . "foo") (bar . "baz")
+       ("value1" "value2" "value3" "value4"))
+      ((name . "foo") "10")))
diff --git a/plugins/src/guile_conf/SConscript b/plugins/src/guile_conf/SConscript
new file mode 100644
index 0000000..4cb9227
--- /dev/null
+++ b/plugins/src/guile_conf/SConscript
@@ -0,0 +1,29 @@
+#-*- mode: python -*-
+Import('dest_dir','listinc')
+
+local_listinc=[
+      GetLaunchDir(),
+      '../../../',
+      '/usr/local/include',
+      '/usr/include/',
+      '/usr/include/guile',
+      '/usr/local/include/guile',
+      '/usr/local/include/libxml2',
+      '/usr/include/libxml2',
+      '.'
+      ]
+
+local_listinc.extend(listinc)
+
+env = Environment(CPPPATH=local_listinc)
+
+conf = Configure(env, config_h="config.h")
+
+if conf.CheckHeader("libguile.h") and conf.CheckLib("guile"):
+    conf.Define('GUILE', 1)
+
+env = conf.Finish()
+
+env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/guile_conf", ["guile_conf.cpp" ], SHLIBPREFIX="")
+
+
diff --git a/plugins/src/guile_conf/guile_conf.cpp b/plugins/src/guile_conf/guile_conf.cpp
new file mode 100644
index 0000000..52befbd
--- /dev/null
+++ b/plugins/src/guile_conf/guile_conf.cpp
@@ -0,0 +1,150 @@
+/*
+  MyServer
+  Copyright (C) 2009, 2010 The Free Software Foundation Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <myserver.h>
+
+#include <libguile.h>
+#include <guile/gh.h>
+#include <include/plugin/plugin.h>
+#include <include/conf/main/main_configuration.h>
+#include <include/server/server.h>
+
+#include <string.h>
+
+#define CONF_FILE_NAME "myserver.sch"
+
+PLUGIN_NAME ("guile_conf");
+
+/*! Define the interface to read from the main configuration file.  */
+class GuileConfiguration : public MainConfiguration
+{
+public:
+  virtual const char *getValue (const char* field);
+  virtual void readData (list<NodeTree<string>*> *hashedDataTrees,
+                         HashMap<string, NodeTree<string>*> *hashedData);
+};
+
+
+static MainConfiguration *genGuileMainConf (Server *server, const char *arg)
+{
+  return new GuileConfiguration ();
+}
+
+
+extern MainConfiguration* (*genMainConf) (Server *server, const char *arg);
+
+const char *
+GuileConfiguration::getValue (const char* field)
+{
+  /* TODO.  */
+  return NULL;
+}
+
+
+static NodeTree<string>*
+traverse (SCM node, HashMap<string, NodeTree<string>*> *hashedData)
+{
+  NodeTree<string> *newNode = new NodeTree<string> ();
+  if (gh_list_p (node))
+    {
+      while (gh_pair_p (gh_car (node)) && gh_symbol_p (gh_car (gh_car (node))))
+        {
+          size_t len;
+          char* attr = gh_symbol2newstr (gh_car (gh_car (node)), &len);
+          char* value = gh_scm2newstr (gh_cdr (gh_car (node)), &len);
+
+          string attrStr (attr);
+          string valueStr (value);
+
+          if (! strcmp (attr, "name"))
+            hashedData->put (valueStr, newNode);
+
+          newNode->addAttr (attrStr, valueStr);
+          node = gh_cdr (node);
+          free (attr);
+          free (value);
+        }
+
+      if (gh_string_p (gh_car (node)))
+        {
+          size_t len;
+          char *str = gh_scm2newstr (gh_car (node), &len);
+          newNode->setValue (new string (str));
+          free (str);
+        }
+      else
+        {
+          while (! gh_null_p (node))
+            {
+              NodeTree<string>* child = traverse (gh_car (node), hashedData);
+              newNode->addChild (child);
+              node = gh_cdr (node);
+            }
+        }
+    }
+
+  return newNode;
+}
+
+static Server *serverInstance;
+
+void
+GuileConfiguration::readData (list<NodeTree<string>*> *hashedDataTrees,
+                              HashMap<string, NodeTree<string>*> *hashedData)
+{
+  gh_eval_file (CONF_FILE_NAME);
+  SCM list = gh_lookup ("configuration");
+
+  if (gh_null_p (list))
+    {
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                   _("GuileConf: cannot find symbol: %s"), "`configuration'");
+      return;
+    }
+
+  while (! gh_null_p (list))
+    {
+      hashedDataTrees->push_back (traverse (gh_car (list), hashedData));
+      list = gh_cdr (list);
+    }
+}
+
+EXPORTABLE(int) load (void* server)
+{
+  /* TODO: This plugin can be loaded only with --plugins.  Fail otherwise.  */
+  scm_init_guile ();
+  serverInstance = static_cast<Server *> (server);
+
+  if (! FilesUtility::nodeExists (CONF_FILE_NAME))
+    {
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                           _("GuileConf: cannot find file %s"), CONF_FILE_NAME);
+      return 1;
+    }
+
+  genMainConf = &genGuileMainConf;
+  return 0;
+}
+
+EXPORTABLE(int) postLoad (void* server)
+{
+  return 0;
+}
+
+EXPORTABLE(int) unLoad ()
+{
+  return 0;
+}
diff --git a/plugins/src/guile_conf/myserver.sch b/plugins/src/guile_conf/myserver.sch
new file mode 100644
index 0000000..ffdd78e
--- /dev/null
+++ b/plugins/src/guile_conf/myserver.sch
@@ -0,0 +1,4 @@
+(define configuration 
+  '(((name . "foo") (bar . "baz")
+     ("value1" "value2" "value3" "value4"))
+    ((name . "foo") "10")))
diff --git a/plugins/src/guile_conf/plugin.xml b/plugins/src/guile_conf/plugin.xml
new file mode 100644
index 0000000..9a4185d
--- /dev/null
+++ b/plugins/src/guile_conf/plugin.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<PLUGIN min-version="0.9" max-version="0.10">
+  <NAME>guile_conf</NAME>
+  <VERSION>0.1</VERSION>
+  <AUTHOR>The Free Software Foundation Inc.</AUTHOR>
+  <MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
+  <DESCRIPTION>Handle the configuration file written in guile</DESCRIPTION>
+</PLUGIN>



commit 66ea79c469ec99d751ceddcdaa31992b4b55e544
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 17:45:52 2010 +0100

    Link against libguile

diff --git a/plugins/src/guile/SConscript b/plugins/src/guile/SConscript
index b9b76f2..f8ea846 100644
--- a/plugins/src/guile/SConscript
+++ b/plugins/src/guile/SConscript
@@ -19,7 +19,7 @@ env = Environment(CPPPATH=local_listinc)
 
 conf = Configure(env, config_h="config.h")
 
-if conf.CheckHeader("libguile.h"):
+if conf.CheckHeader("libguile.h") and conf.CheckLib("guile"):
     conf.Define('GUILE', 1)
 
 env = conf.Finish()



commit bf996fa6a7272272c36a4d1b00c1ffc33c80c5de
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 15:22:03 2010 +0100

    add `eval_file' to the guile plugin.

diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index 836bf31..4d3d707 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -28,6 +28,12 @@ EXPORTABLE(int) eval (char *const string)
   return 0;
 }
 
+EXPORTABLE(int) eval_file (char *const file)
+{
+  gh_eval_file (file);
+  return 0;
+}
+
 EXPORTABLE(int) load (void* server)
 {
   scm_init_guile ();



commit 00b0c5fe2065a63172ac1105f93076c6e9f8d1c6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 15:15:05 2010 +0100

    Remove unused arguments.

diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index 71eb8b0..836bf31 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -28,13 +28,13 @@ EXPORTABLE(int) eval (char *const string)
   return 0;
 }
 
-EXPORTABLE(int) load (void* server, void* parser)
+EXPORTABLE(int) load (void* server)
 {
   scm_init_guile ();
   return 0;
 }
 
-EXPORTABLE(int) postLoad (void* server, void* parser)
+EXPORTABLE(int) postLoad (void* server)
 {
   return 0;
 }
diff --git a/plugins/src/hello/hello.cpp b/plugins/src/hello/hello.cpp
index 702bcf4..a5ea40f 100644
--- a/plugins/src/hello/hello.cpp
+++ b/plugins/src/hello/hello.cpp
@@ -20,13 +20,13 @@
 
 PLUGIN_NAME ("hello");
 
-EXPORTABLE(int) load (void* server, void* parser)
+EXPORTABLE(int) load (void* server)
 {
   printf ("load: hello world!\n");
   return 0;
 }
 
-EXPORTABLE(int) postLoad (void* server, void* parser)
+EXPORTABLE(int) postLoad (void* server)
 {
   printf ("postLoad: hello world!\n");
   return 0;
diff --git a/plugins/src/http_checker/http_checker.cpp b/plugins/src/http_checker/http_checker.cpp
index b3d1710..5e0cc99 100644
--- a/plugins/src/http_checker/http_checker.cpp
+++ b/plugins/src/http_checker/http_checker.cpp
@@ -29,6 +29,7 @@
 typedef int (*executePROC)(char*, u_long);
 typedef int (*executeFromFilePROC)(char*);
 
+PLUGIN_NAME ("http_checker");
 
 struct ThreadData
 {
@@ -217,15 +218,7 @@ private:
 
 static HttpObserver observer;
 
-EXPORTABLE(char*) name(char* name, u_long len)
-{
-  char* str = (char*)"http_checker";
-  if (name)
-    strncpy(name, str, len);
-  return str;
-}
-
-EXPORTABLE(int) load(void* server,void* parser)
+EXPORTABLE(int) load(void* server)
 {
   Server* serverInstance = (Server*)server;
   string msg("new-http-request");
@@ -297,7 +290,7 @@ EXPORTABLE(int) load(void* server,void* parser)
 
   return 0;
 }
-EXPORTABLE(int) postLoad (void* server,void* parser)
+EXPORTABLE(int) postLoad (void* server)
 {
   return 0;
 }
diff --git a/plugins/src/php/php.h b/plugins/src/php/php.h
index 07e2b0e..1faaf2b 100644
--- a/plugins/src/php/php.h
+++ b/plugins/src/php/php.h
@@ -31,9 +31,9 @@
 EXPORTABLE(char*) name(char* name, u_long len);
 
 
-EXPORTABLE(int) load(void* server, void* parser);
+EXPORTABLE(int) load(void* server);
 
-EXPORTABLE(int) postLoad(void* server,void* parser)
+EXPORTABLE(int) postLoad(void* server);
 
 EXPORTABLE(int) unLoad();
 
diff --git a/plugins/src/python/python.h b/plugins/src/python/python.h
index 2b7237b..2267c72 100644
--- a/plugins/src/python/python.h
+++ b/plugins/src/python/python.h
@@ -36,7 +36,7 @@ struct PythonData
 
 extern HashMap<ThreadID, PythonData*> pythonThreadData;
 
-EXPORTABLE(int) load (void* server,void* parser);
+EXPORTABLE(int) load (void* server);
 EXPORTABLE(int) unLoad ();
 
 



commit 9c95db4929b7f577ad91d9e49ab85584ecd03795
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 15:07:37 2010 +0100

    Initialize guile

diff --git a/plugins/src/guile/guile.cpp b/plugins/src/guile/guile.cpp
index 74a5789..71eb8b0 100644
--- a/plugins/src/guile/guile.cpp
+++ b/plugins/src/guile/guile.cpp
@@ -30,6 +30,7 @@ EXPORTABLE(int) eval (char *const string)
 
 EXPORTABLE(int) load (void* server, void* parser)
 {
+  scm_init_guile ();
   return 0;
 }
 



commit f7c3602b68c03c219a63689f73f43207a9633f1d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 12:26:35 2010 +0100

    Fix typo.

diff --git a/myserver/binaries/myserver.default.xml b/myserver/binaries/myserver.default.xml
index d6804be..9ef7099 100755
--- a/myserver/binaries/myserver.default.xml
+++ b/myserver/binaries/myserver.default.xml
@@ -16,15 +16,12 @@
       CREATE-->
   <DEFINE name="server.max_threads" value="200" />
 
-  <!--DIMENSION OF EVERY BUFFER IN BYTES IF ON THE MACHINE THERE IS A
-      LOT OF RAM	THIS VALUES CAN BE INCREASED TO MAKE MYSERVER
-      FASTER. NORMALLY THE MEMORY USED BY BUFFERS IS EQUAL TO
-      BUFFER_SIZE * 2 * NUM_OF_THREADS-->
+  <!-- BUFFER SIZE AVAILABLE TO EVERY THREAD.  -->
   <DEFINE name="server.buffer_size" value="102400" />
 
   <!--DEFAULT FILENAME TO SEND IN A DIRECTORY
       IF THE FILE ISN'T IN THE PATH THEN THE DIRECTORY
-      CONTENT IS SENT	-->
+      CONTENT IS SENT. -->
   <DEFINE name="http.default_file">
     <DEFINE value="default.html"/>
     <DEFINE value="default.htm"/>
@@ -36,11 +33,11 @@
       IF THE CLIENT DOESN'T REQUEST ANYTHING FOR N
       SECONDS THE CONNECTION WITH THE CLIENT IS
       CLOSED. SET THIS TO 0 IF YOU DON'T WANT USE
-      KEEP-ALIVE CONNECTIONS	-->
+      KEEP-ALIVE CONNECTIONS. -->
   <DEFINE name="connection.timeout" value="180" />
 
   <!--SET THIS TO YES FOR USE PERSONALIZED PAGES TO SEND MESSAGE,
-      PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY	-->
+      PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY.  -->
   <DEFINE name="http.use_error_file" value="YES" />
 
   <!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ALLOW TO THE SERVER. IF
@@ -60,7 +57,7 @@
   <DEFINE name="log_color.error_fg" value="red" />
   <DEFINE name="log_color.error_bg" value="black" />
 
-  <!--MAX SIZE OF THE LOG FILE IN BYTES	-->
+  <!--MAX SIZE OF THE LOG FILE IN BYTES.  -->
   <DEFINE name="server.max_log_size" value="1048576" />
 
   <!--DEFINE THE FOLDER BROWSING STYLE-->

-----------------------------------------------------------------------

Summary of changes:
 myserver/binaries/myserver.default.xml       |   13 +--
 plugins/src/guile/SConscript                 |    2 +-
 plugins/src/guile/guile.cpp                  |   15 ++-
 plugins/src/guile_conf/README                |   20 ++++
 plugins/src/{guile => guile_conf}/SConscript |    4 +-
 plugins/src/guile_conf/guile_conf.cpp        |  150 ++++++++++++++++++++++++++
 plugins/src/guile_conf/myserver.sch          |    4 +
 plugins/src/{guile => guile_conf}/plugin.xml |    4 +-
 plugins/src/hello/hello.cpp                  |    4 +-
 plugins/src/http_checker/http_checker.cpp    |   13 +--
 plugins/src/php/php.h                        |    4 +-
 plugins/src/python/python.h                  |    2 +-
 12 files changed, 202 insertions(+), 33 deletions(-)
 create mode 100644 plugins/src/guile_conf/README
 copy plugins/src/{guile => guile_conf}/SConscript (74%)
 create mode 100644 plugins/src/guile_conf/guile_conf.cpp
 create mode 100644 plugins/src/guile_conf/myserver.sch
 copy plugins/src/{guile => guile_conf}/plugin.xml (68%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Feb 24 16:29:42 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NkOne-0005gD-AL
	for mharc-myserver-commit@gnu.org; Wed, 24 Feb 2010 16:29:42 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NkOnc-0005ft-UN
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 16:29:40 -0500
Received: from [140.186.70.92] (port=46422 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NkOnc-0005fT-6P
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 16:29:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkOnb-0002q8-NH
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 16:29:40 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:50566
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkOnb-0002q3-JP
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 16:29:39 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkOnb-0007AD-DZ
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 21:29:39 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NkOna-00074T-Di
	for myserver-commit@gnu.org; Wed, 24 Feb 2010 21:29:39 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 01bfeea1ba67b0fb12599c7a8006416c3e8b8858
X-Git-Newrev: 4671efabcdb308d9286ca9b0925fe580239dfc90
Message-Id: <E1NkOna-00074T-Di@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 24 Feb 2010 21:29:38 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-47-g4671efa
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Feb 2010 21:29:41 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  4671efabcdb308d9286ca9b0925fe580239dfc90 (commit)
      from  01bfeea1ba67b0fb12599c7a8006416c3e8b8858 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 4671efabcdb308d9286ca9b0925fe580239dfc90
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Feb 24 22:05:55 2010 +0100

    Raise an error when the plugin data is not present

diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 55a6e63..935b560 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -288,6 +288,14 @@ PluginsManager::quickLoad (Server *server, const string &plugins)
       string xmlDescriptor = dir + "/plugin.xml";
       PluginInfo *pinfo = loadInfo (server, name, xmlDescriptor);
 
+      if (! pinfo)
+        {
+          server->log (MYSERVER_LOG_MSG_ERROR,
+                       _("Cannot find the plugin data, please check "
+                         "that the specified name and path are correct"));
+          return -1;
+        }
+
       auto_ptr<PluginInfo> pinfoAutoPtr (pinfo);
 
       ret |= loadFile (server, name, file, pinfo);

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/plugin/plugins_manager.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Feb 25 07:24:08 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NkclE-00065X-KF
	for mharc-myserver-commit@gnu.org; Thu, 25 Feb 2010 07:24:08 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NkclC-00065G-NG
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 07:24:06 -0500
Received: from [140.186.70.92] (port=49098 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NkclB-000650-Sy
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 07:24:06 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkclA-0005Rq-9N
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 07:24:06 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:54479
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NkclA-0005Rj-5H
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 07:24:04 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nkcl9-0000yy-8T
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 12:24:03 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nkcl8-0008D6-33
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 12:24:03 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4671efabcdb308d9286ca9b0925fe580239dfc90
X-Git-Newrev: 4d9344c8db8e8c9cdb4005191a482b7c124b5de1
Message-Id: <E1Nkcl8-0008D6-33@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 25 Feb 2010 12:24:02 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-48-g4d9344c
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Feb 2010 12:24:06 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  4d9344c8db8e8c9cdb4005191a482b7c124b5de1 (commit)
      from  4671efabcdb308d9286ca9b0925fe580239dfc90 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 4d9344c8db8e8c9cdb4005191a482b7c124b5de1
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Feb 25 13:23:59 2010 +0100

    Raise an error at configure time if libevent is not available

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 15fe002..8a1322c 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -153,10 +153,13 @@ else
 fi
 AC_SUBST(XNET_LIB)
 
-AC_SEARCH_LIBS([event_add], [event event_core event_extra])
+AC_SEARCH_LIBS([event_add], [event event_core event_extra],,
+                            [AC_MSG_ERROR([*** Cannot find libevent
+*** libevent is required for MyServer])])
 
-AC_CHECK_FUNCS(event_loopbreak, AC_DEFINE(EVENT_LOOPBREAK, 1,
-                         [Define if the event_loopbreak function is present]))
+AC_CHECK_FUNCS(event_loopbreak,
+        AC_DEFINE(EVENT_LOOPBREAK, 1,
+        [Define if the event_loopbreak function is present]))
 
 # Libidn checks
 # -------------

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Feb 25 11:39:58 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nkgkn-0003Av-Fl
	for mharc-myserver-commit@gnu.org; Thu, 25 Feb 2010 11:39:57 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nkgkm-0003Ab-3b
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 11:39:56 -0500
Received: from [140.186.70.92] (port=55633 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nkgkk-0003AO-Bk
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 11:39:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nkgkj-0005pN-Vh
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 11:39:54 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:37090
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nkgkj-0005pB-Jd
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 11:39:53 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nkgki-000436-TE
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 16:39:52 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nkgki-0003px-Q2
	for myserver-commit@gnu.org; Thu, 25 Feb 2010 16:39:52 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4d9344c8db8e8c9cdb4005191a482b7c124b5de1
X-Git-Newrev: debb961a39cbf34b3bd382234e0726752efa6fbd
Message-Id: <E1Nkgki-0003px-Q2@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 25 Feb 2010 16:39:52 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-49-gdebb961
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Feb 2010 16:39:56 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  debb961a39cbf34b3bd382234e0726752efa6fbd (commit)
      from  4d9344c8db8e8c9cdb4005191a482b7c124b5de1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit debb961a39cbf34b3bd382234e0726752efa6fbd
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Feb 25 17:39:49 2010 +0100

    Copy COPYING and version at build time, not on make install.

diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
index 2d2d187..0e6c32a 100644
--- a/myserver/src/GUI/Makefile.am
+++ b/myserver/src/GUI/Makefile.am
@@ -15,9 +15,17 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 AM_CXXFLAGS="-I$(top_srcdir)/lib"
-install:
+
+all: copy_files
+
+
+copy_files:
 if BUILD_GUI
 	cp ../../COPYING MyServer/GUI/
 	cp ../../version MyServer/GUI/
+endif
+
+install:
+if BUILD_GUI
 	python setup.py install --prefix=${prefix} --install-scripts=${bindir}
 endif

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/GUI/Makefile.am |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 26 11:03:02 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nl2ec-0000Bc-2l
	for mharc-myserver-commit@gnu.org; Fri, 26 Feb 2010 11:03:02 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nl2ea-0000BO-Pk
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 11:03:00 -0500
Received: from [140.186.70.92] (port=58566 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nl2eZ-0000Am-Lp
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 11:03:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nl2eY-0006GL-N8
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 11:02:59 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:52919
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nl2eY-0006GA-DU
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 11:02:58 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nl2eY-00046Q-4H
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 16:02:58 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nl2eW-0006en-Np
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 16:02:58 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: debb961a39cbf34b3bd382234e0726752efa6fbd
X-Git-Newrev: 2e5cce1fc0d883b89d271a4fcc57286d4db68783
Message-Id: <E1Nl2eW-0006en-Np@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 26 Feb 2010 16:02:57 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-53-g2e5cce1
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Feb 2010 16:03:01 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  2e5cce1fc0d883b89d271a4fcc57286d4db68783 (commit)
       via  741b6f7377a1cfaf13cf05fb5db9a40a791628e2 (commit)
       via  0f905335055db36e363c60a424dc66e8a2b3e327 (commit)
       via  addab1aa6a83ea508117aa3b756d9342602a9ec9 (commit)
      from  debb961a39cbf34b3bd382234e0726752efa6fbd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 2e5cce1fc0d883b89d271a4fcc57286d4db68783
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 26 17:01:07 2010 +0100

    The `guile_conf' plugin handles virtual hosts.

diff --git a/plugins/src/guile_conf/README b/plugins/src/guile_conf/README
index 7c93035..cc9bf8a 100644
--- a/plugins/src/guile_conf/README
+++ b/plugins/src/guile_conf/README
@@ -18,3 +18,20 @@ contain the children of the node or the value.
     '(((name . "foo") (bar . "baz")
        ("value1" "value2" "value3" "value4"))
       ((name . "foo") "10")))
+
+
+it is possible to use Scheme for virtual hosts definitions too:
+
+having these values in the main configuration file:
+
+  ((name . "server.vhost_handler")
+   "guile")
+  ((name . "server.vhost_location")
+   "virtualhosts.sch")
+
+
+And a new file "virtualhosts.sch" is read, containing for example this
+data:
+
+(define vhosts
+  '(("example" "8080" "web" "system" "http")))
diff --git a/plugins/src/guile_conf/guile_conf.cpp b/plugins/src/guile_conf/guile_conf.cpp
index 52befbd..5e5c9e7 100644
--- a/plugins/src/guile_conf/guile_conf.cpp
+++ b/plugins/src/guile_conf/guile_conf.cpp
@@ -122,6 +122,110 @@ GuileConfiguration::readData (list<NodeTree<string>*> *hashedDataTrees,
     }
 }
 
+class GuileVhostManagerHandler : public VhostManagerHandler
+{
+  vector<Vhost*> vhosts;
+  ListenThreads* lt;
+  LogManager* lm;
+public:
+  GuileVhostManagerHandler (ListenThreads* lt, LogManager* lm)
+  {
+    this->lm = lm;
+    this->lt = lt;
+  }
+
+  virtual Vhost* getVHost (const char *host, const char *ip, u_short port)
+  {
+    vector<Vhost*>::iterator it;
+
+      try
+        {
+          it = vhosts.begin ();
+
+          /*Do a linear search here. We have to use the first full-matching
+           *virtual host.
+           */
+          for (; it != vhosts.end (); it++)
+            {
+              Vhost* vh = *it;
+              /* Control if the host port is the correct one.  */
+              if (vh->getPort () != port)
+                continue;
+              /* If ip is defined check that it is allowed to connect to the host.  */
+              if (ip && !vh->isIPAllowed (ip))
+                continue;
+              /* If host is defined check if it is allowed to connect to the host.  */
+              if (host && !vh->isHostAllowed (host))
+                continue;
+              /* We find a valid host.  */
+              /* Add a reference.  */
+              vh->addRef ();
+              return vh;
+            }
+          return 0;
+        }
+      catch (...)
+        {
+          return 0;
+        };
+    }
+
+  virtual Vhost* getVHostByNumber (int n)
+  {
+    return vhosts[n];
+  }
+
+  virtual int load (const char *resource)
+  {
+    gh_eval_file (serverInstance->getData ("server.vhost_location",
+                                           "virtualhosts.sch"));
+    SCM list = gh_lookup ("vhosts");
+
+    while (! gh_null_p (list))
+      {
+        size_t len;
+        SCM v = gh_car (list);
+        Vhost *vh = new Vhost (lm);
+        char *name = gh_scm2newstr (gh_car (v), &len);
+        vh->setName (name);
+        free (name);
+
+        char *portS = gh_scm2newstr (gh_cadr (v), &len);
+        u_short port = atoi (portS);
+        vh->setPort (port);
+        free (portS);
+
+        char *docroot = gh_scm2newstr (gh_caddr (v), &len);
+        vh->setDocumentRoot (docroot);
+        free (docroot);
+
+        char *sysroot = gh_scm2newstr (gh_caddr (gh_cdr (v)), &len);
+        vh->setSystemRoot (sysroot);
+        free (sysroot);
+
+        char *protocol = gh_scm2newstr (gh_caddr (gh_cddr (v)), &len);
+        vh->setProtocolName (protocol);
+        free (protocol);
+
+        list = gh_cdr (list);
+
+
+        /* TODO: read other information!!!  */
+        lt->addListeningThread (port);
+        vhosts.push_back (vh);
+      }
+    return 0;
+  }
+};
+
+
+static VhostManagerHandler* guile_vhost_builder (ListenThreads* lt,
+                                                 LogManager* lm)
+{
+
+  return new GuileVhostManagerHandler (lt, lm);
+}
+
 EXPORTABLE(int) load (void* server)
 {
   /* TODO: This plugin can be loaded only with --plugins.  Fail otherwise.  */
@@ -134,6 +238,10 @@ EXPORTABLE(int) load (void* server)
                            _("GuileConf: cannot find file %s"), CONF_FILE_NAME);
       return 1;
     }
+  VhostManager *vhostManager = serverInstance->getVhosts ();
+
+  vhostManager->registerBuilder ("guile", guile_vhost_builder);
+
 
   genMainConf = &genGuileMainConf;
   return 0;



commit 741b6f7377a1cfaf13cf05fb5db9a40a791628e2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 26 17:00:32 2010 +0100

    If not specified, use a 102400 bytes threads buffer size.

diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 5643d20..ac522a7 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -868,7 +868,7 @@ int Server::initialize ()
 
   initLogManager ();
 
-  data = getData ("server.buffer_size");
+  data = getData ("server.buffer_size", "102400");
   if (data)
     buffersize = (atol (data) > 81920) ?  atol (data) :  81920 ;
 



commit 0f905335055db36e363c60a424dc66e8a2b3e327
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 26 15:23:56 2010 +0100

    The `server.vhost_location' variable overrides virtual hosts conf resource.

diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 001dd16..5643d20 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -360,8 +360,11 @@ int Server::loadVHostConf ()
 
   vhostManager.setHandler (vhostHandler);
 
+  const char *vhostLocation = getData ("server.vhost_location",
+                                       vhostConfigurationFile.c_str ());
+
   /* Load the virtual hosts configuration.  */
-  if (vhostHandler->load (vhostConfigurationFile.c_str ()))
+  if (vhostHandler->load (vhostLocation))
     {
       log (MYSERVER_LOG_MSG_ERROR,
            _("Error loading the vhost configuration file %s"),



commit addab1aa6a83ea508117aa3b756d9342602a9ec9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 26 13:30:24 2010 +0100

    Refactoring, change some signatures.

diff --git a/myserver/include/conf/vhost/vhost_manager.h b/myserver/include/conf/vhost/vhost_manager.h
index 15b64d5..e138994 100644
--- a/myserver/include/conf/vhost/vhost_manager.h
+++ b/myserver/include/conf/vhost/vhost_manager.h
@@ -30,7 +30,6 @@ public:
   virtual ~VhostManagerHandler ();
   virtual Vhost* getVHost (const char*, const char*, u_short);
   virtual Vhost* getVHostByNumber (int n);
-  virtual int addVHost (Vhost*);
   virtual int load (const char *resource){return 0;}
 };
 
@@ -49,8 +48,8 @@ public:
   /*! Get a pointer to a vhost.  */
   Vhost* getVHost (const char*,const char*, u_short);
   Vhost* getVHostByNumber (int n);
-  void registerBuilder (string &name, MAKE_HANDLER builder);
-  VhostManagerHandler *buildHandler (string &name, ListenThreads *lt,
+  void registerBuilder (const string &name, MAKE_HANDLER builder);
+  VhostManagerHandler *buildHandler (const string &name, ListenThreads *lt,
                                      LogManager *lm);
 
 protected:
diff --git a/myserver/src/conf/vhost/vhost_manager.cpp b/myserver/src/conf/vhost/vhost_manager.cpp
index 6f68445..7c1e82f 100644
--- a/myserver/src/conf/vhost/vhost_manager.cpp
+++ b/myserver/src/conf/vhost/vhost_manager.cpp
@@ -44,11 +44,6 @@ Vhost* VhostManagerHandler::getVHostByNumber (int n)
   return 0;
 }
 
-int VhostManagerHandler::addVHost (Vhost*)
-{
-  return 0;
-}
-
 /*!
  * C'tor.
  */
@@ -101,9 +96,10 @@ Vhost* VhostManager::getVHostByNumber (int n)
  * \param name manager name.
  * \param builder Builder routine.
  */
-void VhostManager::registerBuilder (string &name, MAKE_HANDLER builder)
+void VhostManager::registerBuilder (const string &name, MAKE_HANDLER builder)
 {
-  builders.put (name, builder);
+  string nameStr (name);
+  builders.put (nameStr, builder);
 }
 
 /*!
@@ -112,7 +108,7 @@ void VhostManager::registerBuilder (string &name, MAKE_HANDLER builder)
  * \param name handler name.
  * \return an instance of the requested handler type.
  */
-VhostManagerHandler *VhostManager::buildHandler (string &name,
+VhostManagerHandler *VhostManager::buildHandler (const string &name,
                                                  ListenThreads *lt,
                                                  LogManager *lm)
 {

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/conf/vhost/vhost_manager.h |    5 +-
 myserver/src/conf/vhost/vhost_manager.cpp   |   12 +--
 myserver/src/server/server.cpp              |    7 +-
 plugins/src/guile_conf/README               |   17 ++++
 plugins/src/guile_conf/guile_conf.cpp       |  108 +++++++++++++++++++++++++++
 5 files changed, 136 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Feb 26 18:38:07 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Nl9l1-0004uD-FI
	for mharc-myserver-commit@gnu.org; Fri, 26 Feb 2010 18:38:07 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Nl9kz-0004u6-Bb
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 18:38:05 -0500
Received: from [140.186.70.92] (port=44643 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Nl9ky-0004tx-8V
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 18:38:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nl9kx-0001Qh-W3
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 18:38:04 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:59902
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nl9kx-0001Qb-TB
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 18:38:03 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Nl9kw-0001HG-LU
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 23:38:02 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1Nl9kw-00036S-3U
	for myserver-commit@gnu.org; Fri, 26 Feb 2010 23:38:02 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2e5cce1fc0d883b89d271a4fcc57286d4db68783
X-Git-Newrev: 6ac1124610bc2e0a3fae72e6d085d008adbdebd2
Message-Id: <E1Nl9kw-00036S-3U@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 26 Feb 2010 23:38:02 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-55-g6ac1124
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Feb 2010 23:38:06 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6ac1124610bc2e0a3fae72e6d085d008adbdebd2 (commit)
       via  2389521166169f350abc7f57624428cc85f82168 (commit)
      from  2e5cce1fc0d883b89d271a4fcc57286d4db68783 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6ac1124610bc2e0a3fae72e6d085d008adbdebd2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 27 00:37:51 2010 +0100

    GUI installation honors `DESTDIR'

diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
index 0e6c32a..a26a902 100644
--- a/myserver/src/GUI/Makefile.am
+++ b/myserver/src/GUI/Makefile.am
@@ -27,5 +27,6 @@ endif
 
 install:
 if BUILD_GUI
-	python setup.py install --prefix=${prefix} --install-scripts=${bindir}
+	python setup.py install --prefix=${DESTDIR}${prefix} \
+                 --install-scripts=${DESTDIR}${bindir}
 endif



commit 2389521166169f350abc7f57624428cc85f82168
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Feb 26 23:44:28 2010 +0100

    Give a clearer error message

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 8a1322c..e400a3a 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -155,7 +155,7 @@ AC_SUBST(XNET_LIB)
 
 AC_SEARCH_LIBS([event_add], [event event_core event_extra],,
                             [AC_MSG_ERROR([*** Cannot find libevent
-*** libevent is required for MyServer])])
+                            *** libevent is required for MyServer])])
 
 AC_CHECK_FUNCS(event_loopbreak,
         AC_DEFINE(EVENT_LOOPBREAK, 1,
@@ -193,8 +193,8 @@ dnl Looking for LibXL2
 AM_PATH_XML2(2.6.0, have_xml2=yes)
 if test x$have_xml2 != xyes; then
     AC_MSG_ERROR([
-*** Cannot find libXML2
-*** libXML2 is required for MyServer
+*** Cannot find libxml2
+*** libxml2 is required
 ])
 
 else
@@ -207,7 +207,7 @@ AC_CHECK_LIB(gnutls, main)
 AC_CHECK_LIB(gnutls-openssl, main)
 
 if test x$ac_cv_lib_gnutls_openssl_main != xyes; then
-   AC_MSG_ERROR(Cannot find ssl libraries)
+   AC_MSG_ERROR([Cannot find ssl libraries, gnutls is required])
 fi
 
 dnl Looking for zlib

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac        |    8 ++++----
 myserver/src/GUI/Makefile.am |    3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Feb 27 19:00:59 2010
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NlWah-00031J-L7
	for mharc-myserver-commit@gnu.org; Sat, 27 Feb 2010 19:00:59 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NlWaf-00031D-Q4
	for myserver-commit@gnu.org; Sat, 27 Feb 2010 19:00:57 -0500
Received: from [140.186.70.92] (port=45016 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NlWae-000315-Fv
	for myserver-commit@gnu.org; Sat, 27 Feb 2010 19:00:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NlWad-0007Wa-8b
	for myserver-commit@gnu.org; Sat, 27 Feb 2010 19:00:56 -0500
Received: from colonialone.fsf.org ([140.186.70.51]:51136
	helo=internal.in.savannah.gnu.org)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NlWad-0007WV-4S
	for myserver-commit@gnu.org; Sat, 27 Feb 2010 19:00:55 -0500
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by internal.in.savannah.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NlWac-0001z0-IU
	for myserver-commit@gnu.org; Sun, 28 Feb 2010 00:00:54 +0000
Received: from gscrivano by vcs-noshell.in.savannah.gnu.org with local (Exim
	4.69) (envelope-from <gscrivano@savannah.gnu.org>)
	id 1NlWac-00007u-5c
	for myserver-commit@gnu.org; Sun, 28 Feb 2010 00:00:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6ac1124610bc2e0a3fae72e6d085d008adbdebd2
X-Git-Newrev: bb5cf6002034761e10707b923a85d487856ac4b2
Message-Id: <E1NlWac-00007u-5c@vcs-noshell.in.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 28 Feb 2010 00:00:54 +0000
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0_9_2-60-gbb5cf60
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 28 Feb 2010 00:00:58 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  bb5cf6002034761e10707b923a85d487856ac4b2 (commit)
       via  b9d8f443e6028ad74bc81c54af1c239f2e85d226 (commit)
       via  7d1ac8c2d2ba621f15717578ba749b0bb1d4e457 (commit)
       via  3b4f3854c84f51ab0e7fc59f56b16bb45ad6e8cc (commit)
       via  30706a3c51df12e1151add446b431698a6b61fc9 (commit)
      from  6ac1124610bc2e0a3fae72e6d085d008adbdebd2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit bb5cf6002034761e10707b923a85d487856ac4b2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 28 00:55:14 2010 +0100

    Rename VhostManagerHandler::getVHostByNumber to VhostManagerHandler::getVHost

diff --git a/myserver/include/conf/vhost/vhost_manager.h b/myserver/include/conf/vhost/vhost_manager.h
index e138994..79f2d71 100644
--- a/myserver/include/conf/vhost/vhost_manager.h
+++ b/myserver/include/conf/vhost/vhost_manager.h
@@ -29,7 +29,7 @@ public:
   VhostManagerHandler ();
   virtual ~VhostManagerHandler ();
   virtual Vhost* getVHost (const char*, const char*, u_short);
-  virtual Vhost* getVHostByNumber (int n);
+  virtual Vhost* getVHost (int n);
   virtual int load (const char *resource){return 0;}
 };
 
@@ -47,7 +47,7 @@ public:
 
   /*! Get a pointer to a vhost.  */
   Vhost* getVHost (const char*,const char*, u_short);
-  Vhost* getVHostByNumber (int n);
+  Vhost* getVHost (int n);
   void registerBuilder (const string &name, MAKE_HANDLER builder);
   VhostManagerHandler *buildHandler (const string &name, ListenThreads *lt,
                                      LogManager *lm);
diff --git a/myserver/include/conf/vhost/xml_vhost_handler.h b/myserver/include/conf/vhost/xml_vhost_handler.h
index 446a1fd..883c397 100644
--- a/myserver/include/conf/vhost/xml_vhost_handler.h
+++ b/myserver/include/conf/vhost/xml_vhost_handler.h
@@ -28,7 +28,7 @@ public:
   XmlVhostHandler (ListenThreads* lt, LogManager* lm);
   ~XmlVhostHandler ();
   int getHostsNumber ();
-  Vhost* getVHostByNumber (int n);
+  Vhost* getVHost (int n);
   void clean ();
   int removeVHost (int n);
   int switchVhosts (int n1,int n2);
diff --git a/myserver/src/conf/vhost/vhost_manager.cpp b/myserver/src/conf/vhost/vhost_manager.cpp
index 7c1e82f..da6db7c 100644
--- a/myserver/src/conf/vhost/vhost_manager.cpp
+++ b/myserver/src/conf/vhost/vhost_manager.cpp
@@ -39,7 +39,7 @@ Vhost* VhostManagerHandler::getVHost (const char*, const char*, u_short)
   return NULL;
 }
 
-Vhost* VhostManagerHandler::getVHostByNumber (int n)
+Vhost* VhostManagerHandler::getVHost (int n)
 {
   return 0;
 }
@@ -83,10 +83,10 @@ Vhost* VhostManager::getVHost (const char *host, const char *ip, u_short port)
  *Zero based list.
  *\param n The virtual host id.
  */
-Vhost* VhostManager::getVHostByNumber (int n)
+Vhost* VhostManager::getVHost (int n)
 {
   if (handler)
-    return handler->getVHostByNumber (n);
+    return handler->getVHost (n);
 
   return NULL;
 }
diff --git a/myserver/src/conf/vhost/xml_vhost_handler.cpp b/myserver/src/conf/vhost/xml_vhost_handler.cpp
index a2b4f88..545eadd 100644
--- a/myserver/src/conf/vhost/xml_vhost_handler.cpp
+++ b/myserver/src/conf/vhost/xml_vhost_handler.cpp
@@ -559,9 +559,9 @@ int XmlVhostHandler::load (const char *filename)
 }
 
 /*!
- *\see VhostManager#getVHostByNumber
+ *\see VhostManager#getVHost
  */
-Vhost* XmlVhostHandler::getVHostByNumber (int n)
+Vhost* XmlVhostHandler::getVHost (int n)
 {
   Vhost* ret = 0;
   mutex.lock ();
diff --git a/plugins/src/guile_conf/guile_conf.cpp b/plugins/src/guile_conf/guile_conf.cpp
index 5e5c9e7..868f51f 100644
--- a/plugins/src/guile_conf/guile_conf.cpp
+++ b/plugins/src/guile_conf/guile_conf.cpp
@@ -170,7 +170,7 @@ public:
         };
     }
 
-  virtual Vhost* getVHostByNumber (int n)
+  virtual Vhost* getVHost (int n)
   {
     return vhosts[n];
   }



commit b9d8f443e6028ad74bc81c54af1c239f2e85d226
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 28 00:45:06 2010 +0100

    Use the plugin.h file EXPORTABLE definition.

diff --git a/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp b/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
index 2dfb49a..4416867 100644
--- a/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
+++ b/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
@@ -14,11 +14,7 @@ int isNumber(char* s)
 
 const char *program_name;
 
-#ifdef WIN32
-extern "C" int EXPORTABLE myserver_main (char *cmd, MsCgiData* data)
-#else
-extern "C" int myserver_main (char *cmd, MsCgiData* data)
-#endif
+EXPORTABLE(int) myserver_main (char *cmd, MsCgiData* data)
 {
 	MscgiManager cm(data);
   program_name = cmd;
diff --git a/myserver/binaries/web/cgi-src/post/post.cpp b/myserver/binaries/web/cgi-src/post/post.cpp
index 75ba383..0f9203f 100644
--- a/myserver/binaries/web/cgi-src/post/post.cpp
+++ b/myserver/binaries/web/cgi-src/post/post.cpp
@@ -3,11 +3,7 @@
 
 const char *program_name;
 
-#ifdef WIN32
-extern "C" int EXPORTABLE myserver_main (char *cmd,MsCgiData* data)
-#else
-extern "C" int myserver_main (char *cmd,MsCgiData* data)
-#endif
+EXPORTABLE(int) myserver_main (char *cmd, MsCgiData* data)
 {
   MscgiManager cm(data);
 
diff --git a/myserver/include/http_handler/mscgi/mscgi_manager.h b/myserver/include/http_handler/mscgi/mscgi_manager.h
index 936d60a..661c7f4 100644
--- a/myserver/include/http_handler/mscgi/mscgi_manager.h
+++ b/myserver/include/http_handler/mscgi/mscgi_manager.h
@@ -20,10 +20,6 @@
 #ifndef CGI_MANAGER_H
 # define CGI_MANAGER_H
 
-# ifdef WIN32
-#  define EXPORTABLE _declspec (dllexport)
-# endif
-
 # include "myserver.h"
 
 # include <include/server/server.h>
@@ -33,13 +29,11 @@
 # include <include/protocol/http/http_request.h>
 # include <include/protocol/http/http_response.h>
 # include <include/base/string/stringutils.h>
+# include <include/plugin/plugin.h>
+
 # define LOCAL_BUFFER_DIM 150
 
-# ifdef WIN32
-class EXPORTABLE MscgiManager
-# else
 class MscgiManager
-# endif
 {
  public:
   Server *getServer ();



commit 7d1ac8c2d2ba621f15717578ba749b0bb1d4e457
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 28 00:44:47 2010 +0100

    Fix build under Windows.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index bc8d5ab..009123d 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -637,7 +637,7 @@ void  __stdcall myServerMainNT (u_long, LPTSTR*)
 
       loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath, NULL);
       Server::getInstance ()->start (mainConf, mimeConf, vhostConf, externPath,
-                                     &genMainConf);
+                                     genMainConf);
 
       MyServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
       SetServiceStatus (MyServiceStatusHandle, &MyServiceStatus);



commit 3b4f3854c84f51ab0e7fc59f56b16bb45ad6e8cc
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Feb 28 00:44:20 2010 +0100

    Use gnulib include's to compile myserver.cpp, not system include's.

diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index 65e64bd..2353991 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -14,10 +14,10 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
-AM_CXXFLAGS="-I$(top_srcdir)/lib"
 SUBDIRS = base conf connection connections_scheduler filter http_handler \
 	log plugin protocol server GUI
-AM_CPPFLAGS = $(all_includes)
+AM_CPPFLAGS = $(all_includes) -I$(top_builddir)/lib -I$(top_srcdir)/lib
+AM_CXXFLAGS="-I$(top_srcdir)/lib"
 bin_PROGRAMS = myserver
 myserver_SOURCES = myserver.cpp
 myserver_CXXFLAGS = $(CXXFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"



commit 30706a3c51df12e1151add446b431698a6b61fc9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Feb 27 23:39:11 2010 +0100

    Use LIBS instead of LDFLAGS to specify Windows libraries.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index e400a3a..572c3f9 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -96,7 +96,7 @@ AC_CHECK_FUNCS(regcomp setgroups localtime_r posix_fallocate \
 
 case "${host}" in
     *-*-mingw32*)
-     LDFLAGS="-lwsock32 -lws2_32 -lgdi32 -lole32  -luuid -luserenv $LDFLAGS"
+     LIBS="$LIBS -lwsock32 -lws2_32 -lgdi32 -lole32  -luuid -luserenv"
      MAKE_MSCGI=yes
      LTCFLAGS=""
      ;;

-----------------------------------------------------------------------

Summary of changes:
 .../binaries/web/cgi-src/math_sum/math_sum.cpp     |    6 +-----
 myserver/binaries/web/cgi-src/post/post.cpp        |    6 +-----
 myserver/configure.ac                              |    2 +-
 myserver/include/conf/vhost/vhost_manager.h        |    4 ++--
 myserver/include/conf/vhost/xml_vhost_handler.h    |    2 +-
 .../include/http_handler/mscgi/mscgi_manager.h     |   10 ++--------
 myserver/src/Makefile.am                           |    4 ++--
 myserver/src/conf/vhost/vhost_manager.cpp          |    6 +++---
 myserver/src/conf/vhost/xml_vhost_handler.cpp      |    4 ++--
 myserver/src/myserver.cpp                          |    2 +-
 plugins/src/guile_conf/guile_conf.cpp              |    2 +-
 11 files changed, 17 insertions(+), 31 deletions(-)


hooks/post-receive
-- 
GNU MyServer



