myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-137-


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-137-gca14a85
Date: Thu, 15 Apr 2010 17: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  ca14a85fac9d465bc770699c98fa162168d7bd54 (commit)
       via  b9aa4ca51c64da117ca372dae34501544c1c5512 (commit)
       via  28f364b73b0631ef93153c6f1951f87f808ba208 (commit)
       via  be52d78a003b9a4d4b40ca3727273beb59bbc66b (commit)
       via  53fe1d953e77c08d51be14b0a6e37ccdfe31c75c (commit)
       via  00d9db47fec81591111a5569e333cc0fa59166e7 (commit)
       via  8accbb8a011f574daff78e97c01f72b674dcdf7f (commit)
      from  dc70d8fdaa6bbadfc4069caef758f4d5cfaa8741 (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 ca14a85fac9d465bc770699c98fa162168d7bd54
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 19:04:51 2010 +0200

    Use the `checked' namespace and adjust the code accordingly

diff --git a/myserver/include/base/socket_pair/socket_pair.h 
b/myserver/include/base/socket_pair/socket_pair.h
index 7c29e91..a262d9b 100644
--- a/myserver/include/base/socket_pair/socket_pair.h
+++ b/myserver/include/base/socket_pair/socket_pair.h
@@ -44,6 +44,8 @@ public:
   int readHandle (Handle*);
   int writeHandle (Handle);
 
+  /* Reset the fd's without close them.  */
+  void resetHandles (){handles[0] = handles[1] = -1;}
 protected:
   SocketHandle handles[2];
 };
diff --git a/myserver/po/Makevars b/myserver/po/Makevars
index 32692ab..60a44cc 100644
--- a/myserver/po/Makevars
+++ b/myserver/po/Makevars
@@ -1,3 +1,5 @@
+# -*- buffer-read-only: t -*- vi: set ro:
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
 # Makefile variables for PO directory in any package using GNU gettext.
 
 # Usually the message domain is the same as the package name.
@@ -8,7 +10,12 @@ subdir = po
 top_builddir = ..
 
 # These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \
+          \
+ --flag=_:1:pass-c-format\
+ --flag=N_:1:pass-c-format\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\
+ $${end_of_xgettext_options+}
 
 # This is the copyright holder that gets inserted into the header of the
 # $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
@@ -34,8 +41,8 @@ COPYRIGHT_HOLDER = Free Software Foundation, Inc.
 # It can be your email address, or a mailing list address where translators
 # can write to without being subscribed, or the URL of a web page through
 # which the translators can contact you.
-MSGID_BUGS_ADDRESS =
+MSGID_BUGS_ADDRESS = address@hidden
 
 # This is the list of locale categories, beyond LC_MESSAGES, for which the
 # message catalogs shall be used.  It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
+EXTRA_LOCALE_CATEGORIES = 
diff --git a/myserver/src/base/base64/mime_utils.cpp 
b/myserver/src/base/base64/mime_utils.cpp
index d42f232..c4f47f0 100644
--- a/myserver/src/base/base64/mime_utils.cpp
+++ b/myserver/src/base/base64/mime_utils.cpp
@@ -18,6 +18,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 
 #include "myserver.h"
 #include <include/base/base64/mime_utils.h>
+#include <include/base/exceptions/checked.h>
 
 #ifndef WIN32
 # include <ctype.h>
@@ -456,7 +457,7 @@ char* CQPUtils::expandBuffer (char *buffer, int UsedSize, 
int *BufSize,
   if (UsedSize >= *BufSize - AddVal)
   {
     *BufSize += BufAdd;
-    return (char*)gnulib::realloc (buffer, *BufSize * sizeof (char));
+    return (char*) checked::realloc (buffer, *BufSize * sizeof (char));
   }
   return buffer;
 }
diff --git a/myserver/src/base/exceptions/checked.cpp 
b/myserver/src/base/exceptions/checked.cpp
index f09df20..e63d866 100644
--- a/myserver/src/base/exceptions/checked.cpp
+++ b/myserver/src/base/exceptions/checked.cpp
@@ -63,7 +63,7 @@ namespace checked
 
   int pipe2 (int pipefd[2], int flags)
   {
-    return checkError (pipe2 (pipefd, flags));
+    return checkError (gnulib::pipe2 (pipefd, flags));
   }
 
   int fstat (int fd, struct stat *buf)
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index c5382db..bc67e92 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -21,6 +21,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 #include <include/base/utility.h>
 #include <include/base/string/stringutils.h>
 #include <include/base/file/files_utility.h>
+#include <include/base/exceptions/checked.h>
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -97,7 +98,7 @@ int File::writeToFile (const char* buffer, u_long buffersize, 
u_long* nbw)
     return -1;
   }
 
-  ret = gnulib::write (handle, buffer, buffersize);
+  ret = checked::write (handle, buffer, buffersize);
   if (ret < 0)
     return ret;
 
@@ -160,9 +161,9 @@ int File::openFile (const char* nfilename, u_long opt)
     flags |= O_APPEND;
 
   if (exists)
-    handle = gnulib::open (filename.c_str (), O_APPEND | flags);
+    handle = checked::open (filename.c_str (), O_APPEND | flags);
   else
-    handle = gnulib::open (filename.c_str (), O_CREAT | flags, S_IRUSR | 
S_IWUSR);
+    handle = checked::open (filename.c_str (), O_CREAT | flags, S_IRUSR | 
S_IWUSR);
 
   try
     {
@@ -174,7 +175,7 @@ int File::openFile (const char* nfilename, u_long opt)
           }
  
       if (opt & File::TEMPORARY)
-        if (gnulib::unlink (filename.c_str ()))
+        if (checked::unlink (filename.c_str ()))
           {
             close ();
             return -1;
@@ -266,9 +267,9 @@ int File::close ()
   if (handle != -1)
     {
       if (opt & File::TEMPORARY_DELAYED)
-        gnulib::unlink (filename.c_str ());
-      ret = gnulib::fsync (handle);
-      ret |= gnulib::close (handle);
+        checked::unlink (filename.c_str ());
+      ret = checked::fsync (handle);
+      ret |= checked::close (handle);
     }
 
   filename.clear ();
@@ -285,7 +286,7 @@ u_long File::getFileSize ()
 {
   u_long ret;
   struct stat fStats;
-  ret = gnulib::fstat (handle, &fStats);
+  ret = checked::fstat (handle, &fStats);
   if (ret)
     return (u_long)(-1);
   else
diff --git a/myserver/src/base/file/files_utility.cpp 
b/myserver/src/base/file/files_utility.cpp
index d6a1384..e61aa3c 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -43,6 +43,8 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 #include <sstream>
 #include <memory>
 
+#include <include/base/exceptions/checked.h>
+
 using namespace std;
 
 string FilesUtility::tmpPath;
@@ -138,7 +140,7 @@ int FilesUtility::getPathRecursionLevel (const char* path)
  */
 int FilesUtility::renameFile (const char* before, const char* after)
 {
-  return gnulib::rename (before, after);
+  return checked::rename (before, after);
 }
 
 /*!
@@ -211,7 +213,7 @@ int FilesUtility::copyFile (File& src, File& dest)
 int FilesUtility::deleteFile (const char *filename)
 {
   int ret;
-  ret = gnulib::remove (filename);
+  ret = checked::remove (filename);
 
   if (ret && errno == ENOENT)
     ret = 0;
@@ -251,7 +253,7 @@ int FilesUtility::isLink (const char* filename)
   return 0;
 #else
   struct stat F_Stats;
-  int ret = gnulib::lstat (filename, &F_Stats);
+  int ret = checked::lstat (filename, &F_Stats);
   if (ret < 0)
     return 0;
 
@@ -358,7 +360,7 @@ time_t FilesUtility::getLastAccTime (const char *filename)
 int FilesUtility::chown (const char* filename, string &uid, string &gid)
 {
 #ifndef WIN32
-  return gnulib::chown (filename, Process::getUid (uid.c_str ()),
+  return checked::chown (filename, Process::getUid (uid.c_str ()),
                         Process::getGid (gid.c_str ())) ? 1 : 0;
 #endif
   return 0;
@@ -527,7 +529,7 @@ int FilesUtility::getShortFileName (char *filePath, char 
*out, int buffersize)
  * Return non-zero on errors.
  * \param fileName The buffer to use.
  * \param size The new buffer size.
- * \param dontRealloc Don't gnulib::realloc a new buffer.
+ * \param dontRealloc Don't checked::realloc a new buffer.
  */
 int FilesUtility::completePath (char **fileName, int *size, int dontRealloc)
 {
@@ -648,7 +650,7 @@ int FilesUtility::mkdir (const char *path)
 #ifdef WIN32
   return CreateDirectory (path, NULL) ? 0 : -1;
 #else
-  return gnulib::mkdir (path, S_IRUSR | S_IWUSR);
+  return checked::mkdir (path, S_IRUSR | S_IWUSR);
 #endif
 }
 
@@ -662,7 +664,7 @@ int FilesUtility::rmdir (const char *path)
 #ifdef WIN32
   return RemoveDirectory (path) ? 0 : -1;
 #else
-  return gnulib::rmdir (path);
+  return checked::rmdir (path);
 #endif
 }
 
diff --git a/myserver/src/base/pipe/pipe.cpp b/myserver/src/base/pipe/pipe.cpp
index d067ce0..e70e912 100644
--- a/myserver/src/base/pipe/pipe.cpp
+++ b/myserver/src/base/pipe/pipe.cpp
@@ -36,6 +36,9 @@
 #include <string>
 #include <sstream>
 
+
+#include <include/base/exceptions/checked.h>
+
 using namespace std;
 
 /*!
@@ -73,7 +76,7 @@ int Pipe::read (char* buffer, u_long len, u_long *nbr)
  */
 int Pipe::create (bool readPipe)
 {
-  return gnulib::pipe2 (handles, 0);
+  return checked::pipe2 (handles, 0);
 }
 
 /*!
@@ -85,7 +88,7 @@ int Pipe::create (bool readPipe)
 int Pipe::write (const char* buffer, u_long len, u_long *nbw)
 {
   *nbw = 0;
-  int ret = gnulib::write (handles[1], buffer, len);
+  int ret = checked::write (handles[1], buffer, len);
   if (ret == -1)
     {
       terminated = true;
@@ -121,16 +124,16 @@ int Pipe::close ()
 {
   terminated = true;
   if (handles[0] >= 0)
-    gnulib::close (handles[0]);
+    checked::close (handles[0]);
   if (handles[1] >= 0)
-    gnulib::close (handles[1]);
+    checked::close (handles[1]);
 
   handles[0] = handles[1] = -1;
 
   return 0;
 }
 
-class PipeException : public exception
+class PipeExceptionInt : public exception
 {
 public:
   virtual const char *what () const throw ()
@@ -138,7 +141,7 @@ public:
     return message;
   }
 
-  PipeException (string & str)
+  PipeExceptionInt (string & str)
   {
     this->message = str.c_str ();
   }
@@ -154,12 +157,12 @@ private:
  */
 void Pipe::inverted (Pipe& pipe)
 {
-  pipe.handles[0] = gnulib::dup (handles[1]);
-  pipe.handles[1] = gnulib::dup (handles[0]);
+  pipe.handles[0] = checked::dup (handles[1]);
+  pipe.handles[1] = checked::dup (handles[0]);
   if (pipe.handles[0] < 0 || pipe.handles[1] < 0)
     {
       string err (_("Internal error"));
-      throw PipeException (err);
+      throw PipeExceptionInt (err);
     }
 }
 
@@ -181,7 +184,7 @@ void Pipe::closeRead ()
 {
   terminated = true;
   if (handles[0] >= 0)
-    gnulib::close (handles[0]);
+    checked::close (handles[0]);
   handles[0] = -1;
 }
 
@@ -192,7 +195,7 @@ void Pipe::closeWrite ()
 {
   terminated = true;
   if (handles[1] >= 0)
-    gnulib::close (handles[1]);
+    checked::close (handles[1]);
   handles[1] = -1;
 }
 
@@ -214,7 +217,7 @@ int Pipe::waitForData (int sec, int usec)
 
   FD_SET (handles[0], &readfds);
 
-  ret = gnulib::select (handles[0] + 1, &readfds, NULL, NULL, &tv);
+  ret = checked::select (handles[0] + 1, &readfds, NULL, NULL, &tv);
 
   if (ret == -1 || ret == 0)
     return 0;
diff --git a/myserver/src/base/process/fork_server.cpp 
b/myserver/src/base/process/fork_server.cpp
index f3f25cf..f2f2934 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -21,6 +21,8 @@
 #include <include/base/file/files_utility.h>
 #include <include/base/utility.h>
 
+#include <include/base/exceptions/checked.h>
+
 #ifndef WIN32
 # include <unistd.h>
 # include <sys/wait.h>
@@ -205,13 +207,13 @@ int ForkServer::handleRequest (Socket *sock)
   delete [] chroot;
 
   if (flags & FLAG_USE_IN)
-    gnulib::close (stdIn);
+    checked::close (stdIn);
 
   if (flags & FLAG_USE_OUT)
-    gnulib::close (stdOut);
+    checked::close (stdOut);
 
   if (flags & FLAG_USE_ERR)
-    gnulib::close (stdErr);
+    checked::close (stdErr);
 #endif
 
   return 0;
@@ -349,10 +351,17 @@ void ForkServer::killServer ()
 {
   u_long nbw;
   UnixSocket s;
-  s.socket ();
-  s.connect (socketPath.c_str ());
-  s.write ("e", 1, &nbw);
-  s.close ();
+  try
+    {
+      s.socket ();
+      s.connect (socketPath.c_str ());
+      s.write ("e", 1, &nbw);
+      s.close ();
+    }
+  catch (...)
+    {
+
+    }
 }
 
 /*!
diff --git a/myserver/src/base/process/process.cpp 
b/myserver/src/base/process/process.cpp
index 2f08615..e8c992e 100644
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -25,6 +25,8 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 #include <stdlib.h>
 #include <stdio.h>
 
+#include <include/base/exceptions/checked.h>
+
 #ifndef WIN32
 # include <unistd.h>
 # include <signal.h>
@@ -265,28 +267,28 @@ int Process::exec (StartProcInfo* spi, bool waitEnd)
         exit (1);
 
       if ((long)spi->stdOut == -1)
-        spi->stdOut = gnulib::open ("/dev/null", O_WRONLY);
+        spi->stdOut = checked::open ("/dev/null", O_WRONLY);
 
       if ((long)spi->stdError == -1)
-        spi->stdError = gnulib::open ("/dev/null", O_WRONLY);
+        spi->stdError = checked::open ("/dev/null", O_WRONLY);
 
-      gnulib::close (0);
+      checked::close (0);
 
       if (spi->stdIn != -1)
         {
-          if (gnulib::dup2 (spi->stdIn, 0) == -1)
+          if (checked::dup2 (spi->stdIn, 0) == -1)
             exit (1);
-          gnulib::close (spi->stdIn);
+          checked::close (spi->stdIn);
         }
 
-      gnulib::close (1);
+      checked::close (1);
 
-      if (gnulib::dup2 (spi->stdOut, 1) == -1)
+      if (checked::dup2 (spi->stdOut, 1) == -1)
         exit (1);
 
-      gnulib::close (2);
+      checked::close (2);
 
-      if (gnulib::dup2 (spi->stdError, 2) == -1)
+      if (checked::dup2 (spi->stdError, 2) == -1)
         exit (1);
 
       if (spi->handlesToClose)
@@ -294,16 +296,15 @@ int Process::exec (StartProcInfo* spi, bool waitEnd)
           FileHandle* h = spi->handlesToClose;
           while (*h)
             {
-              gnulib::close (*h);
+              checked::close (*h);
               h++;
             }
         }
 
-      execve ((const char*)args[0],
-              (char* const*)args, (char* const*) envp);
+      execve ((const char*) args[0],
+              (char* const*) args, (char* const*) envp);
 
     exit (1);
-
   }
 
   if (waitEnd)
@@ -534,11 +535,11 @@ int Process::setAdditionalGroups (u_long len, u_long 
*groups)
 
   for (i = 0; i < len; i++)
     if (groups)
-      gids[i] = (gid_t)groups[i];
+      gids[i] = (gid_t) groups[i];
     else
-      gids[i] = (gid_t)0;
+      gids[i] = (gid_t) 0;
 
-  ret = setgroups ((size_t)0, gids) == -1;
+  ret = setgroups ((size_t) 0, gids) == -1;
 
   delete [] gids;
 
diff --git a/myserver/src/base/read_directory/read_directory.cpp 
b/myserver/src/base/read_directory/read_directory.cpp
index 8e02794..4f4dd21 100644
--- a/myserver/src/base/read_directory/read_directory.cpp
+++ b/myserver/src/base/read_directory/read_directory.cpp
@@ -28,6 +28,7 @@
 # include <fcntl.h>
 #endif
 
+#include <include/base/exceptions/checked.h>
 
 using namespace std;
 
@@ -132,7 +133,7 @@ int ReadDirectory::find (const char *filename)
        if (dirName[dirName.length () - 1] == '/')
          dirName.erase (dirName.length () - 1);
 
-       dh = gnulib::opendir (dirName.c_str ());
+       dh = checked::opendir (dirName.c_str ());
 
        if (dh == NULL)
          return -1;
@@ -156,7 +157,7 @@ int ReadDirectory::find (const char *filename)
 # endif
 
 # ifdef HAVE_FSTATAT
-   if (gnulib::fstatat (dirfd (dh), name.c_str (), &stats, 0))
+   if (checked::fstatat (dirfd (dh), name.c_str (), &stats, 0))
      return -1;
 # else
    string tempName;
@@ -196,7 +197,7 @@ int ReadDirectory::findclose ()
   if (!dh)
     return -1;
 
-  gnulib::closedir (dh);
+  checked::closedir (dh);
   dh = NULL;
   return 0;
 #endif
diff --git a/myserver/src/base/safetime/safetime.cpp 
b/myserver/src/base/safetime/safetime.cpp
index 3bb1eeb..e4ed781 100644
--- a/myserver/src/base/safetime/safetime.cpp
+++ b/myserver/src/base/safetime/safetime.cpp
@@ -27,6 +27,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 # include <stdio.h>
 #endif
 
+#include <include/base/exceptions/checked.h>
 
 #ifndef WIN32
 # if !HAVE_LOCALTIME_R
@@ -68,7 +69,7 @@ struct tm *myserver_localtime (const time_t *timep, tm* res)
   memcpy (res, localtime (timep), sizeof (tm));
   return res;
 #elif HAVE_LOCALTIME_R
-  return gnulib::localtime_r (timep, res);
+  return checked::localtime_r (timep, res);
 #else
 
   mutex.lock ();
@@ -90,7 +91,7 @@ struct tm *myserver_gmtime (const time_t *timep, tm* res)
   return res;
 
 #elif HAVE_LOCALTIME_R
-  return gnulib::gmtime_r (timep, res);
+  return checked::gmtime_r (timep, res);
 #else
 
   mutex.lock ();
diff --git a/myserver/src/base/socket/socket.cpp 
b/myserver/src/base/socket/socket.cpp
index f2bab81..5bce4af 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -32,6 +32,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 # include <arpa/inet.h>
 #endif
 
+#include <include/base/exceptions/checked.h>
 
 #include <sstream>
 
@@ -94,7 +95,7 @@ int Socket::operator=(Socket* s)
  */
 int Socket::socket (int af, int type, int protocol)
 {
-  fd = gnulib::socket (af, type, protocol);
+  fd = checked::socket (af, type, protocol);
   return fd;
 }
 
@@ -168,7 +169,7 @@ int Socket::bind (MYSERVER_SOCKADDR* sa, int namelen)
       )
     return -1;
 
-  return gnulib::bind (fd, (struct sockaddr*) sa, namelen);
+  return checked::bind (fd, (struct sockaddr*) sa, namelen);
 }
 
 /*!
@@ -176,7 +177,7 @@ int Socket::bind (MYSERVER_SOCKADDR* sa, int namelen)
  */
 int Socket::listen (int max)
 {
-  return gnulib::listen (fd, max);
+  return checked::listen (fd, max);
 }
 
 /*!
@@ -184,7 +185,7 @@ int Socket::listen (int max)
  */
 Socket* Socket::accept (MYSERVER_SOCKADDR* sa, socklen_t* sockaddrlen)
 {
-  int acceptedHandle = gnulib::accept (fd, (struct sockaddr *)sa,
+  int acceptedHandle = checked::accept (fd, (struct sockaddr *)sa,
                                        sockaddrlen);
 
   if (acceptedHandle >= 0)
@@ -200,7 +201,7 @@ int Socket::close ()
 {
   int ret = -1;
   if (fd >= 0)
-    ret = gnulib::close (fd);
+    ret = checked::close (fd);
 
   fd = -1;
   return ret;
@@ -227,7 +228,7 @@ MYSERVER_HOSTENT *Socket::gethostbyname (const char 
*hostname)
  */
 int Socket::shutdown (int how)
 {
-  return gnulib::shutdown (fd, how);
+  return checked::shutdown (fd, how);
 }
 
 /*!
@@ -236,7 +237,7 @@ int Socket::shutdown (int how)
 int  Socket::setsockopt (int level, int optname,
                        const char *optval, int optlen)
 {
-  return gnulib::setsockopt (fd, level, optname, optval, optlen);
+  return checked::setsockopt (fd, level, optname, optval, optlen);
 }
 
 /*!
@@ -320,7 +321,7 @@ int Socket::getLocalIPsList (string &out)
  */
 int Socket::rawSend (const char* buffer, int len, int flags)
 {
-  return gnulib::send (fd, buffer, len, flags);
+  return checked::send (fd, buffer, len, flags);
 }
 
 /*!
@@ -373,7 +374,7 @@ int Socket::send (const char* buffer, int len, int flags)
  */
 int Socket::ioctlsocket (long cmd, unsigned long* argp)
 {
-  return gnulib::ioctl (fd, cmd, argp);
+  return checked::checkError (gnulib::ioctl (fd, cmd, argp));
 }
 
 /*!
@@ -409,7 +410,7 @@ int Socket::connect (const char* host, u_short port)
     }
 
   memset (szPort, 0, sizeof (char)*10);
-  gnulib::snprintf (szPort, 10, "%d", port);
+  checked::snprintf (szPort, 10, "%d", port);
 
   if (aiHints.ai_family != 0)
     nGetaddrinfoRet = getaddrinfo (host, NULL, &aiHints, &pHostInfo);
@@ -521,7 +522,7 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
  )
     return -1;
 
-  return gnulib::connect (fd, (sockaddr *) sa, na);
+  return checked::connect (fd, (sockaddr *) sa, na);
 }
 
 /*!
@@ -548,7 +549,7 @@ int Socket::recv (char* buffer,int len,int flags)
 {
   int err = 0;
 
-  err = gnulib::recv (fd, buffer, len, flags);
+  err = checked::recv (fd, buffer, len, flags);
 
   if ( err < 0 && errno == EAGAIN && isNonBlocking)
     return 0;
@@ -593,7 +594,7 @@ int Socket::setNonBlocking (int nonBlocking)
   u_long nonblock = nonBlocking ? 1 : 0;
   ret = ioctlsocket (FIONBIO, &nonblock);
 #else
-  flags = gnulib::fcntl (fd, F_GETFL, 0);
+  flags = checked::checkError (gnulib::fcntl (fd, F_GETFL, 0));
   if (flags < 0)
     return -1;
 
@@ -602,7 +603,7 @@ int Socket::setNonBlocking (int nonBlocking)
   else
     flags &= ~O_NONBLOCK;
 
-  ret = gnulib::fcntl (fd, F_SETFL, flags);
+  ret = checked::checkError (gnulib::fcntl (fd, F_SETFL, flags));
 
   isNonBlocking = nonBlocking ? true : false;
 #endif
@@ -615,7 +616,7 @@ int Socket::setNonBlocking (int nonBlocking)
  */
 int Socket::gethostname (char *name, int namelen)
 {
-  return gnulib::gethostname (name,namelen);
+  return checked::gethostname (name,namelen);
 }
 
 /*!
@@ -624,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 = gnulib::getsockname (fd, (struct sockaddr *)ad, &len);
+  int ret = checked::getsockname (fd, (struct sockaddr *)ad, &len);
   *namelen = (int)len;
   return ret;
 }
@@ -659,7 +660,7 @@ int Socket::dataAvailable (int sec, int usec)
   FD_ZERO (&readfds);
   FD_SET (fd, &readfds);
 
-  ret = gnulib::select (fd + 1, &readfds, NULL, NULL, &tv);
+  ret = checked::select (fd + 1, &readfds, NULL, NULL, &tv);
   if (ret <= 0)
     return 0;
 
diff --git a/myserver/src/base/socket/ssl_socket.cpp 
b/myserver/src/base/socket/ssl_socket.cpp
index 9804890..defde91 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -21,6 +21,8 @@
 #include <include/base/utility.h>
 #include "include/base/socket/ssl_socket.h"
 
+#include <include/base/exceptions/checked.h>
+
 #include <string.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -68,6 +70,7 @@ SslSocket::SslSocket ()
 SslSocket::~SslSocket ()
 {
   freeSSL ();
+  fd = -1;
 }
 
 /*!
@@ -75,8 +78,7 @@ SslSocket::~SslSocket ()
  */
 int SslSocket::close ()
 {
-  freeSSL ();
-  return Socket::close ();
+  return freeSSL ();
 }
 
 /*!
@@ -87,7 +89,7 @@ int SslSocket::shutdown (int how)
   if (sslConnection)
     SSL_shutdown (sslConnection);
 
-  return gnulib::shutdown (fd, how);
+  return checked::shutdown (fd, how);
 }
 
 /*!
@@ -131,7 +133,7 @@ int SslSocket::connect (MYSERVER_SOCKADDR* sa, int na)
     return -1;
 
   /*! Do the TCP connection.  */
-  if (gnulib::connect (fd, (sockaddr *) sa, na))
+  if (checked::connect (fd, (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 868b527..c7243c6 100644
--- a/myserver/src/base/socket_pair/socket_pair.cpp
+++ b/myserver/src/base/socket_pair/socket_pair.cpp
@@ -43,6 +43,8 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 #include <string>
 #include <sstream>
 
+#include <include/base/exceptions/checked.h>
+
 using namespace std;
 
 
@@ -75,7 +77,7 @@ int SocketPair::create ()
     return -1;
 
   handles[0] = handles[1] = -1;
-  listener = gnulib::socket (AF_INET, SOCK_STREAM, 0);
+  listener = checked::socket (AF_INET, SOCK_STREAM, 0);
 
   if (listener < 0)
     return -1;
@@ -85,47 +87,47 @@ int SocketPair::create ()
   addr.sin_addr.s_addr = htonl (0x7f000001);
   addr.sin_port = 0;
 
-  if (gnulib::bind (listener, (struct sockaddr*) &addr, sizeof (addr)) < 0)
+  if (checked::bind (listener, (struct sockaddr*) &addr, sizeof (addr)) < 0)
     {
-      gnulib::close (listener);
+      checked::close (listener);
       return -1;
     }
 
-  if (gnulib::getsockname (listener, (struct sockaddr*) &addr, &addrlen) < 0)
+  if (checked::getsockname (listener, (struct sockaddr*) &addr, &addrlen) < 0)
     {
-      gnulib::close (listener);
+      checked::close (listener);
       return -1;
     }
 
   do
     {
-      if (gnulib::listen (listener, 1) < 0)
+      if (checked::listen (listener, 1) < 0)
         break;
 
-      if ((handles[0] = gnulib::socket (AF_INET, SOCK_STREAM, 0)) < 0)
+      if ((handles[0] = checked::socket (AF_INET, SOCK_STREAM, 0)) < 0)
         break;
 
-      if (gnulib::connect (handles[0], (struct sockaddr*) &addr,
+      if (checked::connect (handles[0], (struct sockaddr*) &addr,
                            sizeof (addr)) < 0)
         break;
 
-      if ((handles[1] = gnulib::accept (listener, NULL, NULL)) < 0)
+      if ((handles[1] = checked::accept (listener, NULL, NULL)) < 0)
         break;
 
       fd = handles[0];
 
-      gnulib::close (listener);
+      checked::close (listener);
       return 0;
     } while (0);
 
-  gnulib::close (listener);
+  checked::close (listener);
 
   if (handles[0] != -1)
-    gnulib::close (handles[0]);
+    checked::close (handles[0]);
 
 
   if (handles[1] != -1)
-    gnulib::close (handles[1]);
+    checked::close (handles[1]);
 
   return -1;
 #endif
@@ -180,8 +182,11 @@ int SocketPair::close ()
  */
 void SocketPair::closeFirstHandle ()
 {
-  Socket sock (handles[0]);
-  sock.close ();
+  if (handles[0] < 0)
+    return;
+
+  checked::close (handles[0]);
+  fd = handles[0] = -1;
 }
 
 /*!
@@ -189,8 +194,11 @@ void SocketPair::closeFirstHandle ()
  */
 void SocketPair::closeSecondHandle ()
 {
-  Socket sock (handles[1]);
-  sock.close ();
+  if (handles[1] < 0)
+    return;
+
+  checked::close (handles[1]);
+  handles[1] = -1;
 }
 
 /*!
diff --git a/myserver/src/base/ssl/ssl.cpp b/myserver/src/base/ssl/ssl.cpp
index f249b22..95c04ba 100644
--- a/myserver/src/base/ssl/ssl.cpp
+++ b/myserver/src/base/ssl/ssl.cpp
@@ -23,6 +23,8 @@
 
 #include <string.h>
 
+#include <include/base/exceptions/checked.h>
+
 #if HAVE_PTHREAD
 # include <pthread.h>
 #endif
diff --git a/myserver/src/base/string/stringutils.cpp 
b/myserver/src/base/string/stringutils.cpp
index 5a76950..265497e 100644
--- a/myserver/src/base/string/stringutils.cpp
+++ b/myserver/src/base/string/stringutils.cpp
@@ -20,6 +20,8 @@
 #include <include/base/string/stringutils.h>
 #include <include/base/safetime/safetime.h>
 
+#include <include/base/exceptions/checked.h>
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -309,7 +311,7 @@ time_t getTime (const char* str)
 
   t.tm_isdst = -1;
 
-  return gnulib::mktime (&t);
+  return checked::mktime (&t);
 }
 
 /*!
diff --git a/myserver/src/base/sync/event.cpp b/myserver/src/base/sync/event.cpp
index 20583aa..780f3a8 100644
--- a/myserver/src/base/sync/event.cpp
+++ b/myserver/src/base/sync/event.cpp
@@ -37,6 +37,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 # include <sys/wait.h>
 #endif
 
+#include <include/base/exceptions/checked.h>
 
 #include <sys/types.h>
 
@@ -95,7 +96,7 @@ int Event::wait (u_long id, u_long timeout)
   {
     struct timespec ts;
     struct timeval tp;
-    gnulib::gettimeofday (&tp, NULL);
+    checked::gettimeofday (&tp, NULL);
     ts.tv_sec = tp.tv_sec + tp.tv_usec / 1000000 + timeout / 1000;
     ts.tv_nsec = (tp.tv_usec * 1000 + timeout * 1000000) % 1000000000;
 
diff --git a/myserver/src/base/sync/mutex.cpp b/myserver/src/base/sync/mutex.cpp
index f86fe18..09f8217 100644
--- a/myserver/src/base/sync/mutex.cpp
+++ b/myserver/src/base/sync/mutex.cpp
@@ -104,15 +104,7 @@ int Mutex::destroy ()
 int Mutex::lock (u_long /*id*/)
 {
 #ifdef HAVE_PTHREAD
-# ifdef PTHREAD_ALTERNATE_LOCK
   pthread_mutex_lock (&mutex);
-# else
-  while (pthread_mutex_trylock (&mutex) == EBUSY)
-  {
-    Thread::wait (1);
-  }
-# endif
-
 #else
   WaitForSingleObject (mutex, INFINITE);
 #endif
diff --git a/myserver/src/base/unix_socket/unix_socket.cpp 
b/myserver/src/base/unix_socket/unix_socket.cpp
index 3e76fc3..e130b44 100644
--- a/myserver/src/base/unix_socket/unix_socket.cpp
+++ b/myserver/src/base/unix_socket/unix_socket.cpp
@@ -20,6 +20,8 @@
 #include <include/base/unix_socket/unix_socket.h>
 #include <include/base/utility.h>
 
+#include <include/base/exceptions/checked.h>
+
 #ifdef AF_UNIX
 void UnixSocket::makeAddrInfo (sockaddr_un *info, const char *path)
 {
@@ -52,7 +54,13 @@ int UnixSocket::bind (const char* path)
 
 #ifdef AF_UNIX
   makeAddrInfo (&addr, path);
-  gnulib::unlink (path);
+  try
+    {
+      checked::unlink (path);
+    }
+  catch (...)
+    {
+    }
 
   return Socket::bind ((MYSERVER_SOCKADDR*) &addr, sizeof (sockaddr_un));
 #else
@@ -68,7 +76,7 @@ int UnixSocket::shutdown ()
 {
 #ifdef AF_UNIX
   Socket::shutdown (2);
-  return gnulib::unlink (addr.sun_path);
+  return checked::unlink (addr.sun_path);
 #else
   return -1;
 #endif
diff --git a/myserver/src/base/utility.cpp b/myserver/src/base/utility.cpp
index a7b4653..5df6d69 100644
--- a/myserver/src/base/utility.cpp
+++ b/myserver/src/base/utility.cpp
@@ -41,6 +41,7 @@ extern "C"
 # endif
 #endif
 
+#include <include/base/exceptions/checked.h>
 
 #ifdef WIN32
 # include <direct.h>
@@ -70,7 +71,7 @@ static int initializeCwd ()
   if (currentPath)
     return 0;
 
-  currentPath = gnulib::getcwd (NULL, 0);
+  currentPath = checked::getcwd (NULL, 0);
   if (!currentPath)
     return -1;
 
@@ -145,7 +146,7 @@ char *getdefaultwd (char *path, int len)
 int setcwd (const char *dir)
 {
   int ret;
-  char *tmp = gnulib::strdup (dir);
+  char *tmp = checked::strdup (dir);
   if (!tmp)
     return -1;
 
@@ -204,7 +205,7 @@ u_long getTicks ()
   return GetTickCount ();
 #else
   struct timeval tval;
-  int ret = gnulib::gettimeofday (&tval, 0);
+  int ret = checked::gettimeofday (&tval, 0);
   if (ret == -1)
     return 0;
   return  (tval.tv_sec * 1000) + (tval.tv_usec / 1000);
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp 
b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 0d34e49..2d9c315 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -25,6 +25,7 @@
 #endif
 
 #include <include/connections_scheduler/connections_scheduler.h>
+#include <include/base/exceptions/exceptions.h>
 #include <include/server/server.h>
 
 static DEFINE_THREAD (dispatcher, p)
@@ -35,33 +36,31 @@ static DEFINE_THREAD (dispatcher, p)
   if (da == NULL)
     return NULL;
 
-  da->mutex->lock ();
-  if (!da->terminated)
-    {
-      da->mutex->unlock ();
-      return 0;
-    }
+  if (! da->terminated)
+    return 0;
 
   da->terminated = false;
 
-  da->mutex->unlock ();
-
   while (!da->terminate)
     {
       int res;
 
       da->mutex->lock ();
-      res = event_loop (EVLOOP_ONCE);
-      da->mutex->unlock ();
+      try
+        {
+          res = event_loop (EVLOOP_ONCE);
+          da->mutex->unlock ();
+        }
+      catch (...)
+        {
+          da->mutex->unlock ();
+        }
 
       if (res == 1)
         Thread::wait (10);
     }
 
-  da->mutex->lock ();
   da->terminated = true;
-  da->mutex->unlock ();
-
   return NULL;
 }
 
@@ -80,8 +79,16 @@ void ConnectionsScheduler::newData (short event, 
SocketHandle handle)
   ConnectionPtr connection = NULL;
 
   connectionsMutex.lock ();
-  connection = connections.get ((int) handle);
-  connectionsMutex.unlock ();
+  try
+    {
+      connection = connections.get ((int) handle);
+      connectionsMutex.unlock ();
+    }
+  catch (...)
+    {
+      connectionsMutex.unlock ();
+      throw;
+    }
 
   if (connection == NULL || server == NULL)
     return;
@@ -166,12 +173,20 @@ static void listenerHandler (int fd, short event, void 
*arg)
     {
       MYSERVER_SOCKADDRIN asockIn;
       socklen_t asockInLen = sizeof (asockIn);
-      Socket *clientSock;
+      Socket *clientSock = NULL;
       try
         {
           do
             {
-              clientSock = s->serverSocket->accept (&asockIn, &asockInLen);
+              try
+                {
+                  clientSock = s->serverSocket->accept (&asockIn, &asockInLen);
+                }
+              catch (InvalidResourceException & e)
+                {
+                  clientSock = NULL;
+                }
+
               if (s->server && clientSock
                   && s->server->addConnection (clientSock, &asockIn))
                 {
@@ -186,6 +201,11 @@ static void listenerHandler (int fd, short event, void 
*arg)
         {
           s->server->log (MYSERVER_LOG_MSG_ERROR, _("Error listening on socket 
%s"),
                           e.what ());
+          throw;
+        }
+      catch (...)
+        {
+          throw;
         }
     }
 
@@ -219,10 +239,18 @@ void ConnectionsScheduler::listener 
(ConnectionsScheduler::ListenerArg *la)
   listeners.push_front (arg);
 
   eventsSocketMutex.lock ();
-  u_long nbw;
-  dispatcherArg.socketPairWrite.write ("l", 1, &nbw);
-  dispatcherArg.socketPairWrite.write ((const char*) &arg, sizeof (arg), &nbw);
-  eventsSocketMutex.unlock ();
+  try
+    {
+      u_long nbw;
+      dispatcherArg.socketPairWrite.write ("l", 1, &nbw);
+      dispatcherArg.socketPairWrite.write ((const char*) &arg, sizeof (arg), 
&nbw);
+      eventsSocketMutex.unlock ();
+    }
+  catch (...)
+    {
+      eventsSocketMutex.unlock ();
+      throw;
+    }
 }
 
 /*!
@@ -231,9 +259,16 @@ void ConnectionsScheduler::listener 
(ConnectionsScheduler::ListenerArg *la)
 void ConnectionsScheduler::removeListener (ConnectionsScheduler::ListenerArg* 
la)
 {
   eventsMutex.lock ();
-  event_del (&(la->ev));
-  listeners.remove (la);
-  eventsMutex.unlock ();
+  try
+    {
+      event_del (&(la->ev));
+      listeners.remove (la);
+      eventsMutex.unlock ();
+    }
+  catch (...)
+    {
+      eventsMutex.unlock ();
+    }
 }
 
 /*!
@@ -268,8 +303,16 @@ u_long ConnectionsScheduler::getNumTotalConnections ()
 void ConnectionsScheduler::registerConnectionID (ConnectionPtr connection)
 {
   connectionsMutex.lock ();
-  connection->setID (nTotalConnections++);
-  connectionsMutex.unlock ();
+  try
+    {
+      connection->setID (nTotalConnections++);
+      connectionsMutex.unlock ();
+    }
+  catch (...)
+    {
+      connectionsMutex.unlock ();
+      throw;
+    }
 }
 
 /*!
@@ -295,13 +338,7 @@ void ConnectionsScheduler::restart ()
  */
 void ConnectionsScheduler::initialize ()
 {
-  static int initialized = 0;
-
-  if (!initialized)
-    {
-      event_init ();
-      initialized = 1;
-    }
+  event_init ();
 
   dispatcherArg.terminated = true;
   dispatcherArg.terminate = false;
@@ -390,8 +427,16 @@ void ConnectionsScheduler::addReadyConnectionImpl 
(ConnectionPtr c)
   c->setScheduled (1);
 
   readyMutex.lock ();
-  ready[priority].push (c);
-  readyMutex.unlock ();
+  try
+    {
+      ready[priority].push (c);
+      readyMutex.unlock ();
+    }
+  catch (...)
+    {
+      readyMutex.unlock ();
+      throw;
+    }
 
   if (server)
     server->checkThreadsNumber ();
@@ -437,8 +482,16 @@ void ConnectionsScheduler::addWaitingConnectionImpl 
(ConnectionPtr c, int lock)
   c->setScheduled (0);
 
   connectionsMutex.lock ();
-  connections.put (socketHandle, c);
-  connectionsMutex.unlock ();
+  try
+    {
+      connections.put (socketHandle, c);
+      connectionsMutex.unlock ();
+    }
+  catch (...)
+    {
+      connectionsMutex.unlock ();
+      throw;
+    }
 
   /*
    * If there is need to obtain the events lock don't block the current
@@ -450,16 +503,22 @@ void ConnectionsScheduler::addWaitingConnectionImpl 
(ConnectionPtr c, int lock)
     {
       u_long nbw;
       eventsSocketMutex.lock ();
-
-      dispatcherArg.socketPairWrite.write ("c", 1, &nbw);
-      dispatcherArg.socketPairWrite.write ((const char*) &handle,
-                                           sizeof (SocketHandle), &nbw);
-      dispatcherArg.socketPairWrite.write ((const char*) &c,
-                                           sizeof (ConnectionPtr), &nbw);
-      dispatcherArg.socketPairWrite.write ((const char*) &tv,
-                                           sizeof (timeval), &nbw);
-
-      eventsSocketMutex.unlock ();
+      try
+        {
+          dispatcherArg.socketPairWrite.write ("c", 1, &nbw);
+          dispatcherArg.socketPairWrite.write ((const char*) &handle,
+                                               sizeof (SocketHandle), &nbw);
+          dispatcherArg.socketPairWrite.write ((const char*) &c,
+                                               sizeof (ConnectionPtr), &nbw);
+          dispatcherArg.socketPairWrite.write ((const char*) &tv,
+                                               sizeof (timeval), &nbw);
+          eventsSocketMutex.unlock ();
+        }
+      catch (...)
+        {
+          eventsSocketMutex.unlock ();
+          throw;
+        }
     }
   else
     event_once (
@@ -488,27 +547,33 @@ ConnectionPtr ConnectionsScheduler::getConnection ()
     return NULL;
 
   readyMutex.lock ();
-
-  for (int i = 0; i < PRIORITY_CLASSES; i++)
+  try
     {
-      if (currentPriorityDone > currentPriority ||
-          !ready[currentPriority].size ())
+      for (int i = 0; i < PRIORITY_CLASSES; i++)
         {
-          currentPriority = (currentPriority + 1) % PRIORITY_CLASSES;
-          currentPriorityDone = 0;
-        }
+          if (currentPriorityDone > currentPriority ||
+              !ready[currentPriority].size ())
+            {
+              currentPriority = (currentPriority + 1) % PRIORITY_CLASSES;
+              currentPriorityDone = 0;
+            }
 
-      if (ready[currentPriority].size ())
-        {
-          ret = ready[currentPriority].front ();
-          ret->setScheduled (0);
-          ready[currentPriority].pop ();
-          currentPriorityDone++;
-          break;
+          if (ready[currentPriority].size ())
+            {
+              ret = ready[currentPriority].front ();
+              ret->setScheduled (0);
+              ready[currentPriority].pop ();
+              currentPriorityDone++;
+              break;
+            }
         }
+      readyMutex.unlock ();
+    }
+  catch (...)
+    {
+      readyMutex.unlock ();
+      throw;
     }
-
-  readyMutex.unlock ();
   return ret;
 }
 
@@ -529,8 +594,16 @@ void ConnectionsScheduler::release ()
     readySemaphore->unlock ();
 
   eventsSocketMutex.lock ();
-  dispatcherArg.socketPairWrite.write ("r", 1, &nbw);
-  eventsSocketMutex.unlock ();
+  try
+    {
+      dispatcherArg.socketPairWrite.write ("r", 1, &nbw);
+      eventsSocketMutex.unlock ();
+    }
+  catch (...)
+    {
+      eventsSocketMutex.unlock ();
+      throw;
+    }
 
   if (dispatchedThreadId)
     Thread::join (dispatchedThreadId);
@@ -538,23 +611,24 @@ void ConnectionsScheduler::release ()
   terminateConnections ();
 
   eventsMutex.lock ();
-
-  event_del (&(dispatcherArg.loopEvent));
-
-  list<ListenerArg*>::iterator it = listeners.begin ();
-
-  while (it != listeners.end ())
+  try
     {
-      event_del (&((*it)->ev));
-      delete *it;
-      it++;
+      event_del (&(dispatcherArg.loopEvent));
+      list<ListenerArg*>::iterator it = listeners.begin ();
+      while (it != listeners.end ())
+        {
+          event_del (&((*it)->ev));
+          delete *it;
+          it++;
+        }
+      listeners.clear ();
+      eventsMutex.unlock ();
+    }
+  catch (...)
+    {
+      eventsMutex.unlock ();
+      throw;
     }
-
-  listeners.clear ();
-
-  eventsMutex.unlock ();
-
-  dispatcherArg.socketPair.close ();
 }
 
 /*!
@@ -567,12 +641,18 @@ void ConnectionsScheduler::getConnections 
(list<ConnectionPtr> &out)
   out.clear ();
 
   connectionsMutex.lock ();
-
-  HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin ();
-  for (; it != connections.end (); it++)
-    out.push_back (*it);
-
-  connectionsMutex.unlock ();
+  try
+    {
+      HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin ();
+      for (; it != connections.end (); it++)
+        out.push_back (*it);
+      connectionsMutex.unlock ();
+    }
+  catch (...)
+    {
+      connectionsMutex.unlock ();
+      throw;
+    }
 }
 
 /*!
@@ -589,9 +669,17 @@ u_long ConnectionsScheduler::getNumAliveConnections ()
 void ConnectionsScheduler::removeConnection (ConnectionPtr connection)
 {
   connectionsMutex.lock ();
-  if (connection->socket)
-    connections.remove ((SocketHandle)connection->socket->getHandle ());
-  connectionsMutex.unlock ();
+  try
+    {
+      if (connection->socket)
+        connections.remove (connection->socket->getHandle ());
+      connectionsMutex.unlock ();
+    }
+  catch (...)
+    {
+      connectionsMutex.unlock ();
+      throw;
+    }
 }
 
 /*!
@@ -600,11 +688,9 @@ void ConnectionsScheduler::removeConnection (ConnectionPtr 
connection)
 void ConnectionsScheduler::terminateConnections ()
 {
   int i;
-
+  connectionsMutex.lock ();
   try
     {
-      connectionsMutex.lock ();
-
       HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin ();
       for (; it != connections.end (); it++)
         {
@@ -612,6 +698,7 @@ void ConnectionsScheduler::terminateConnections ()
           if (c->allowDelete (true) && c->socket)
             c->socket->close ();
         }
+      connectionsMutex.unlock ();
     }
   catch (...)
     {
@@ -621,15 +708,19 @@ void ConnectionsScheduler::terminateConnections ()
 
   connections.clear ();
 
-  connectionsMutex.unlock ();
-
   readyMutex.lock ();
-
-  for (i = 0; i < PRIORITY_CLASSES; i++)
-    while (ready[i].size ())
-      ready[i].pop ();
-
-  readyMutex.unlock ();
+  try
+  {
+    for (i = 0; i < PRIORITY_CLASSES; i++)
+      while (ready[i].size ())
+        ready[i].pop ();
+    readyMutex.unlock ();
+  }
+  catch (...)
+    {
+      readyMutex.unlock ();
+      throw;
+    }
 }
 
 /*!
@@ -639,20 +730,17 @@ int ConnectionsScheduler::accept 
(ConnectionsSchedulerVisitor* visitor, void* ar
 {
   int ret = 0;
   connectionsMutex.lock ();
-
   try
     {
       for (HashMap<SocketHandle, ConnectionPtr>::Iterator it =
              connections.begin (); it != connections.end ()  && !ret; it++)
         visitor->visitConnection (*it, args);
+      connectionsMutex.unlock ();
     }
   catch (...)
     {
       connectionsMutex.unlock ();
       return 1;
     }
-
-  connectionsMutex.unlock ();
-
   return ret;
 }
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index e47baf1..eb142b8 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -77,14 +77,21 @@ int
 LogManager::clear ()
 {
   mutex->lock ();
-  map<string, LogStream*>::iterator it;
-  for (it = logStreams.begin (); it != logStreams.end (); it++)
+  try
     {
-      delete it->second;
+      map<string, LogStream*>::iterator it;
+      for (it = logStreams.begin (); it != logStreams.end (); it++)
+        {
+          delete it->second;
+        }
+      logStreams.clear ();
+      owners.clear ();
+      logStreamOwners.clear ();
+    }
+  catch (...)
+    {
+      mutex->unlock ();
     }
-  logStreams.clear ();
-  owners.clear ();
-  logStreamOwners.clear ();
   mutex->unlock ();
   return !empty ();
 }
@@ -108,36 +115,44 @@ int
 LogManager::add (const void *owner, string type, string location,
                  list<string>& filters, u_long cycle)
 {
-  mutex->lock ();
   int failure = 1;
-  if (!contains (location))
+  int oldSize;
+  int newSize;
+
+  mutex->lock ();
+  try
     {
-      LogStream* ls = lsf->create (ff, location, filters, cycle);
-      if (ls)
+      if (! contains (location))
         {
-          failure = add (owner) || add (owner, type) ||
-            add (owner, type, location, ls);
+          LogStream* ls = lsf->create (ff, location, filters, cycle);
+          if (ls)
+            {
+              failure = add (owner) || add (owner, type)
+                || add (owner, type, location, ls);
+            }
+          mutex->unlock ();
+          return failure;
         }
-      mutex->unlock ();
-      return failure;
-    }
 
-  int oldSize;
-  int newSize;
-  ostringstream oss;
+      ostringstream oss;
 
-  oldSize = logStreamOwners[location].size ();
-  if (!containsOwner (owner))
-    {
-      failure = add (owner) || add (owner, type) ||
-        add (owner, type, location, logStreams[location]);
+      oldSize = logStreamOwners[location].size ();
+      if (!containsOwner (owner))
+        {
+          failure = add (owner) || add (owner, type) ||
+            add (owner, type, location, logStreams[location]);
+        }
+      else if (!contains (owner, type))
+        {
+          failure = add (owner, type) ||
+            add (owner, type, location, logStreams[location]);
+        }
+      newSize = logStreamOwners[location].size ();
     }
-  else if (!contains (owner, type))
+  catch (...)
     {
-      failure = add (owner, type) ||
-        add (owner, type, location, logStreams[location]);
+      mutex->unlock ();
     }
-  newSize = logStreamOwners[location].size ();
 
   mutex->unlock ();
 
@@ -244,34 +259,40 @@ LogManager::remove (const void *owner)
 
 
   mutex->lock ();
-
-  if (!containsOwner (owner))
+  try
     {
-      mutex->unlock ();
-      return 1;
-    }
+      if (!containsOwner (owner))
+        {
+          mutex->unlock ();
+          return 1;
+        }
 
-  map<string, map<string, LogStream*> >* m = &owners[owner];
-  map<string, map<string, LogStream*> >::iterator it_1;
-  for (it_1 = m->begin (); it_1 != m->end (); it_1++)
-    {
-      map<string, LogStream*> *t = &it_1->second;
-      map<string, LogStream*>::iterator it_2;
-      for (it_2 = t->begin (); it_2 != t->end (); it_2++)
+      map<string, map<string, LogStream*> >* m = &owners[owner];
+      map<string, map<string, LogStream*> >::iterator it_1;
+      for (it_1 = m->begin (); it_1 != m->end (); it_1++)
         {
-          logStreamOwners[it_2->first].remove (owner);
-          if (!logStreamOwners[it_2->first].size ())
+          map<string, LogStream*> *t = &it_1->second;
+          map<string, LogStream*>::iterator it_2;
+          for (it_2 = t->begin (); it_2 != t->end (); it_2++)
             {
-              delete it_2->second;
-              logStreams.erase (it_2->first);
-              logStreamOwners.erase (it_2->first);
+              logStreamOwners[it_2->first].remove (owner);
+              if (!logStreamOwners[it_2->first].size ())
+                {
+                  delete it_2->second;
+                  logStreams.erase (it_2->first);
+                  logStreamOwners.erase (it_2->first);
+                }
             }
+          t->clear ();
         }
-      t->clear ();
+      m->clear ();
+      owners.erase (owner);
+      failure = 0;
+    }
+  catch (...)
+    {
+      mutex->unlock ();
     }
-  m->clear ();
-  owners.erase (owner);
-  failure = 0;
 
   mutex->unlock ();
   return failure;
@@ -534,7 +555,6 @@ LogManager::log (const void* owner, const string & type, 
const string & location
     return 1;
 
   mutex->lock ();
-
   try
     {
       failure = notify (owner, type, MYSERVER_LOG_EVT_SET_MODE, &level)
@@ -612,14 +632,12 @@ LogManager::log (const void* owner, const string & type, 
LoggingLevel level,
                  bool ts, bool appendNL, const char *fmt, va_list args)
 {
   int failure = 0;
+  ostringstream oss;
 
   if (level < this->level)
     return 1;
 
   mutex->lock ();
-
-  ostringstream oss;
-
   try
     {
       if (ts)
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 59f4874..156d8dd 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -23,6 +23,8 @@
 #include <include/base/process/process.h>
 #include <include/conf/main/xml_main_configuration.h>
 
+#include <include/base/exceptions/checked.h>
+
 #ifdef WIN32
 # include <direct.h>
 #endif
@@ -105,12 +107,12 @@ void registerSignals ()
   sig1.sa_handler = SIG_IGN;
   sig2.sa_handler = Sig_Quit;
   sig3.sa_handler = Sig_Hup;
-  gnulib::sigaction (SIGPIPE, &sig1, NULL);
-  gnulib::sigaction (SIGINT, &sig2, NULL);
-  gnulib::sigaction (SIGTERM, &sig2, NULL);
-  gnulib::sigaction (SIGHUP, &sig3, NULL);
+  checked::sigaction (SIGPIPE, &sig1, NULL);
+  checked::sigaction (SIGINT, &sig2, NULL);
+  checked::sigaction (SIGTERM, &sig2, NULL);
+  checked::sigaction (SIGHUP, &sig3, NULL);
   /* Avoid zombie processes.  */
-  gnulib::sigaction (SIGCHLD, &sa, (struct sigaction *)NULL);
+  checked::sigaction (SIGCHLD, &sa, (struct sigaction *)NULL);
 #else
   SetConsoleMode (GetStdHandle (STD_INPUT_HANDLE), ENABLE_PROCESSED_INPUT);
   SetConsoleCtrlHandler ((PHANDLER_ROUTINE) SignalHandler, TRUE);
@@ -548,18 +550,18 @@ int writePidfile (const char* filename)
       file.append ("/var/run/myserver.pid");
     }
 
-  pidfile = gnulib::open (filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+  pidfile = checked::open (filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
   if (pidfile == -1)
     return -1;
 
   sprintf (buff,"%i\n", pid);
-  ret = gnulib::write (pidfile, buff, strlen (buff));
+  ret = checked::write (pidfile, buff, strlen (buff));
   if (ret == -1)
     {
-      gnulib::close (pidfile);
+      checked::close (pidfile);
       return -1;
     }
-  return gnulib::close (pidfile);
+  return checked::close (pidfile);
 }
 #endif
 
diff --git a/myserver/src/plugin/plugins_manager.cpp 
b/myserver/src/plugin/plugins_manager.cpp
index 9b2cf35..8d26810 100644
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -154,11 +154,14 @@ PluginsManager::preLoad (Server* server, string &resource)
       if (fdir.name[0] == '.')
         continue;
 
-
-      ret = flib.findfirst (dirname.c_str ());
-
-      if (ret == -1)
-        continue;
+      try
+        {
+          ret = flib.findfirst (dirname.c_str ());
+        }
+      catch (...)
+        {
+          continue;
+        }
 
       do
         {
diff --git a/myserver/src/protocol/ftp/ftp.cpp 
b/myserver/src/protocol/ftp/ftp.cpp
index 2e1a4b9..016f15b 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -31,6 +31,8 @@
 #include <include/base/string/stringutils.h>
 #include <include/base/mem_buff/mem_buff.h>
 
+#include <include/base/exceptions/checked.h>
+
 #include <include/conf/security/auth_domain.h>
 
 #ifndef WIN32
@@ -58,7 +60,7 @@ void setFtpHost (FtpHost & out, const FtpHost & in)
 void setFtpHost (FtpHost & out, const char *szIn)
 {
   std::stringstream ss;
-  char *szLocalIn = gnulib::strdup (szIn);
+  char *szLocalIn = checked::strdup (szIn);
   char *tok = strtok (szLocalIn, ",.");
   while (tok != NULL)
     {
diff --git a/myserver/src/protocol/http/http.cpp 
b/myserver/src/protocol/http/http.cpp
index 61450f7..cfa0f69 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -45,6 +45,7 @@
 #include <include/http_handler/proxy/proxy.h>
 #include <include/http_handler/http_dir/http_dir.h>
 #include <include/protocol/http/http_data_read.h>
+#include <include/base/exceptions/checked.h>
 
 #include <string>
 #include <ostream>
@@ -1171,18 +1172,24 @@ int Http::controlConnection (ConnectionPtr a, char*, 
char*, u_long, u_long,
             }
         }
 
-      /* If the inputData file was not closed close it.  */
-      if (td->inputData.getHandle ())
+      try
         {
-          td->inputData.close ();
-          FilesUtility::deleteFile (td->inputDataPath);
-        }
+          /* If the inputData file was not closed close it.  */
+          if (td->inputData.getHandle ())
+            {
+              td->inputData.close ();
+              FilesUtility::deleteFile (td->inputDataPath);
+            }
 
-       /* If the outputData file was not closed close it.  */
-      if (td->outputData.getHandle ())
+          /* If the outputData file was not closed close it.  */
+          if (td->outputData.getHandle ())
+            {
+              td->outputData.close ();
+              FilesUtility::deleteFile (td->outputDataPath);
+            }
+        }
+      catch (GenericFileException & e)
         {
-          td->outputData.close ();
-          FilesUtility::deleteFile (td->outputDataPath);
         }
 
       bool keepalive = false;
diff --git a/myserver/src/server/clients_thread.cpp 
b/myserver/src/server/clients_thread.cpp
index da1aebc..e4fc0af 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -30,6 +30,8 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 #include <include/protocol/control/control_protocol.h>
 #include <include/protocol/ftp/ftp.h>
 
+#include <include/base/exceptions/checked.h>
+
 #ifndef WIN32
 # include <sys/socket.h>
 # include <netinet/in.h>
@@ -100,11 +102,11 @@ DEFINE_THREAD (clients_thread, pParam)
 #ifndef WIN32
   /* Block SigTerm, SigInt, and SigPipe in threads.  */
   sigset_t sigmask;
-  gnulib::sigemptyset (&sigmask);
-  gnulib::sigaddset (&sigmask, SIGPIPE);
-  gnulib::sigaddset (&sigmask, SIGINT);
-  gnulib::sigaddset (&sigmask, SIGTERM);
-  gnulib::sigprocmask (SIG_SETMASK, &sigmask, NULL);
+  checked::sigemptyset (&sigmask);
+  checked::sigaddset (&sigmask, SIGPIPE);
+  checked::sigaddset (&sigmask, SIGINT);
+  checked::sigaddset (&sigmask, SIGTERM);
+  checked::sigprocmask (SIG_SETMASK, &sigmask, NULL);
 #endif
   ClientsThread *ct = (ClientsThread*)pParam;
 
diff --git a/myserver/tests/test_connection.cpp 
b/myserver/tests/test_connection.cpp
index 30fea07..8ff0640 100644
--- a/myserver/tests/test_connection.cpp
+++ b/myserver/tests/test_connection.cpp
@@ -198,5 +198,4 @@ public:
 
 };
 
-
 CPPUNIT_TEST_SUITE_REGISTRATION ( TestConnection );
diff --git a/myserver/tests/test_connections_scheduler.cpp 
b/myserver/tests/test_connections_scheduler.cpp
index ba60bcd..81100da 100644
--- a/myserver/tests/test_connections_scheduler.cpp
+++ b/myserver/tests/test_connections_scheduler.cpp
@@ -27,47 +27,47 @@
 
 class MockSocket : public Socket
 {
-  FileHandle handle;
+  Socket s;
 public:
 
   /*
    * BE SURE TO USE VALID HANDLES.
    * 0, 1, 2 are valid ones.
    */
-  MockSocket (FileHandle handle)
+  MockSocket ()
   {
-    this->handle = handle;
+    s.socket (AF_INET, SOCK_STREAM, 0);
   }
 
   virtual int connect (MYSERVER_SOCKADDR*, int)
   {
     return 0;
   }
-       virtual int closesocket ()
+  virtual int closesocket ()
   {
     return 0;
   }
 
-       virtual int shutdown (int how)
+  virtual int shutdown (int how)
   {
     return 0;
   }
-       virtual int recv (char*, int, int, u_long)
+  virtual int recv (char*, int, int, u_long)
   {
     return 0;
   }
-       virtual int recv (char*, int, int)
+  virtual int recv (char*, int, int)
   {
     return 0;
   }
-       virtual u_long bytesToRead ()
+  virtual u_long bytesToRead ()
   {
     return 0;
   }
 
-       virtual Handle getHandle ()
+  virtual Handle getHandle ()
   {
-    return (Handle) handle;
+    return (Handle) s.getHandle ();
   }
 
 };
@@ -132,7 +132,7 @@ public:
     for (u_long i = 0; i < max; i++)
       {
         ConnectionPtr conn = new Connection;
-        conn->socket = new MockSocket ((FileHandle) i);
+        conn->socket = new MockSocket ();
         scheduler->addWaitingConnection (conn);
       }
 
@@ -145,28 +145,28 @@ public:
   void testGetConnections ()
   {
     ConnectionPtr conn = new Connection;
-    conn->socket = new MockSocket ((FileHandle) 1);
+    conn->socket = new MockSocket ();
 
     list<ConnectionPtr> out;
 
     scheduler->getConnections (out);
 
-    CPPUNIT_ASSERT_EQUAL (out.size (), (size_t)0);
+    CPPUNIT_ASSERT_EQUAL (out.size (), (size_t) 0);
 
     conn = new Connection;
-    conn->socket = new MockSocket ((FileHandle) 2);
+    conn->socket = new MockSocket ();
 
     scheduler->addWaitingConnection (conn);
 
     scheduler->getConnections (out);
 
-    CPPUNIT_ASSERT_EQUAL (out.size (), (size_t)1);
+    CPPUNIT_ASSERT_EQUAL (out.size (), (size_t) 1);
   }
 
   void testGetNumTotalConnections ()
   {
     ConnectionPtr conn = new Connection;
-    conn->socket = new MockSocket ((FileHandle) 1);
+    conn->socket = new MockSocket ();
 
     CPPUNIT_ASSERT_EQUAL (scheduler->getNumTotalConnections (), 0ul);
 
@@ -190,7 +190,7 @@ public:
     ConnectionPtr gotConn;
 
     ConnectionPtr conn = new Connection;
-    conn->socket = new MockSocket ((FileHandle) 1);
+    conn->socket = new MockSocket ();
 
     CPPUNIT_ASSERT_EQUAL (scheduler->getNumTotalConnections (), 0ul);
 
@@ -210,7 +210,7 @@ public:
   void testAddNewConnection ()
   {
     ConnectionPtr conn = new Connection;
-    conn->socket = new MockSocket ((FileHandle) 1);
+    conn->socket = new MockSocket ();
 
     CPPUNIT_ASSERT_EQUAL (scheduler->getNumTotalConnections (), 0ul);
 
@@ -229,5 +229,4 @@ public:
 
 };
 
-
 CPPUNIT_TEST_SUITE_REGISTRATION ( TestConnectionsScheduler );
diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 1eb49b8..0330020 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -65,7 +65,13 @@ public:
   void tearDown ()
   {
     delete tfile;
-    FilesUtility::deleteFile (fname);
+    try
+      {
+        FilesUtility::deleteFile (fname);
+      }
+    catch (...)
+      {
+      }
   }
 
   void testCreateTemporaryDelayedFile ()
@@ -126,7 +132,13 @@ public:
     CPPUNIT_ASSERT_EQUAL (tfile->getFileSize (), nbr);
     CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
 
-    FilesUtility::deleteFile (fname.c_str ());
+    try
+      {
+        FilesUtility::deleteFile (fname.c_str ());
+      }
+    catch (...)
+      {
+      }
   }
 
   void testCreationTime ()
@@ -173,8 +185,14 @@ public:
   void testTruncate ()
   {
     u_long nbw;
-
-    CPPUNIT_ASSERT_EQUAL (FilesUtility::deleteFile (fname.c_str ()), 0);
+    
+    try
+      {
+        FilesUtility::deleteFile (fname.c_str ());
+      }
+    catch (...)
+      {
+      }
 
     CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
 
@@ -195,7 +213,13 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (tfile->getFileSize (), dataLen + dataLen / 2);
 
-    FilesUtility::deleteFile (fname.c_str ());
+    try
+      {
+        FilesUtility::deleteFile (fname.c_str ());
+      }
+    catch (...)
+      {
+      }
   }
 
 };
diff --git a/myserver/tests/test_file_stream.cpp 
b/myserver/tests/test_file_stream.cpp
index fbf1a4e..a6ff1a5 100644
--- a/myserver/tests/test_file_stream.cpp
+++ b/myserver/tests/test_file_stream.cpp
@@ -47,13 +47,33 @@ public:
     ff->insert ("gzip", Gzip::factory);
   }
 
+  void tearDown ()
+  {
+    delete ff;
+    delete fsc;
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
+  }
+
   void testCycleLog ()
   {
     list<string> filters;
     string message;
     string message2;
     LogStream* ls;
-    FilesUtility::deleteFile ("foo");
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
+
     ostringstream oss;
 
     oss << "thisisaverylongmessage" << endl;
@@ -87,7 +107,7 @@ public:
         CPPUNIT_ASSERT_EQUAL (nbr, (u_long) message.length ());
         CPPUNIT_ASSERT (!message.compare (buf));
         f.close ();
-        CPPUNIT_ASSERT (!FilesUtility::deleteFile (*it));
+        CPPUNIT_ASSERT (! FilesUtility::deleteFile (*it));
       }
     delete ls;
   }
@@ -109,7 +129,13 @@ public:
     oss << endl;
     message2.assign (oss.str ());
 
-    FilesUtility::deleteFile ("foo");
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
     ls = fsc->create (ff, "foo", filters, 0);
     CPPUNIT_ASSERT (ls);
     ls->log (message1);
@@ -130,13 +156,6 @@ public:
     CPPUNIT_ASSERT (!string (buf).compare (message1.append (message2)));
   }
 
-  void tearDown ()
-  {
-    delete ff;
-    delete fsc;
-    FilesUtility::deleteFile ("foo");
-  }
-
 private:
   FiltersFactory* ff;
   FileStreamCreator* fsc;
diff --git a/myserver/tests/test_log_manager.cpp 
b/myserver/tests/test_log_manager.cpp
index 27afaf3..21fa5e0 100644
--- a/myserver/tests/test_log_manager.cpp
+++ b/myserver/tests/test_log_manager.cpp
@@ -94,6 +94,21 @@ public:
     lm = new LogManager (ff);
   }
 
+  void tearDown ()
+  {
+    lm->close (this, "test", "file://foo");
+    delete lm;
+    delete ff;
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
+  }
+
+
   void testEmpty ()
   {
     CPPUNIT_ASSERT (lm->empty ());
@@ -151,8 +166,13 @@ public:
     File f;
     char buf[message.size () + 1];
     u_long nbr;
-    FilesUtility::deleteFile ("foo");
-
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
     lm->add (this, "test", "file://foo", filters, 0);
     lm->log (this, "test", "file://foo", message);
     lm->close (this);
@@ -167,7 +187,13 @@ public:
   void testFileStreamClose ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
 
@@ -177,7 +203,13 @@ public:
   void testCloseAnAlreadyClosedFileStream ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->close (this, "test", "file://foo");
@@ -198,7 +230,13 @@ public:
     LogStream* ls;
     list<string> cs;
     list<string>::iterator it;
-    FilesUtility::deleteFile ("foobar");
+    try
+      {
+        FilesUtility::deleteFile ("foobar");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foobar", filters, 10);
     lm->log (this, "test", "file://foobar", message);
@@ -220,11 +258,24 @@ public:
         buf[nbr] = '\0';
         f.close ();
         gotMessage.assign (buf);
-        FilesUtility::deleteFile (*it);
+        try
+          {
+            FilesUtility::deleteFile (*it);
+          }
+        catch (...)
+          {
+          }
       }
 
     lm->close (this);
-    FilesUtility::deleteFile ("foobar");
+
+    try
+      {
+        FilesUtility::deleteFile ("foobar");
+      }
+    catch (...)
+      {
+      }
 
     CPPUNIT_ASSERT (!message1.compare (gotMessage1));
     CPPUNIT_ASSERT (!message.compare (gotMessage));
@@ -244,7 +295,14 @@ public:
   void testMessageLevelLessThanLogManagerOne ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->setLevel (MYSERVER_LOG_MSG_WARNING);
@@ -256,7 +314,14 @@ public:
   void testMessageLevelEqualToLogManagerOne ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->setLevel (MYSERVER_LOG_MSG_WARNING);
@@ -268,7 +333,14 @@ public:
   void testClear ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (this, "test", "console://stdout", filters, 0);
@@ -288,7 +360,13 @@ public:
     u_long nbr;
     GzipDecompress gzdc;
 
-    FilesUtility::deleteFile ("fooz");
+    try
+      {
+        FilesUtility::deleteFile ("fooz");
+      }
+    catch (...)
+      {
+      }
 
     filters.push_back ("gzip");
     lm->add (this, "test", "file://fooz", filters, 0);
@@ -302,7 +380,13 @@ public:
                      gzipChainDecomp, 64);
     gzipChainDecomp[message.size ()] = '\0';
 
-    FilesUtility::deleteFile ("fooz");
+    try
+      {
+        FilesUtility::deleteFile ("fooz");
+      }
+    catch (...)
+      {
+      }
 
     CPPUNIT_ASSERT (!message.compare (gzipChainDecomp));
   }
@@ -323,7 +407,14 @@ public:
     list<string> cs;
     list<string>::iterator it;
     LogStream* ls;
-    FilesUtility::deleteFile ("fooc");
+
+    try
+      {
+        FilesUtility::deleteFile ("fooc");
+      }
+    catch (...)
+      {
+      }
 
     filters.push_back ("gzip");
     lm->add (this, "test", "file://fooc", filters, cycleLog);
@@ -349,10 +440,24 @@ public:
                          gzipDecomp, 128);
         gzipDecomp[message.size ()] = '\0';
         gotMessage.assign (gzipDecomp);
-        FilesUtility::deleteFile (*it);
+
+        try
+          {
+            FilesUtility::deleteFile (*it);
+          }
+        catch (...)
+          {
+          }
       }
     lm->close (this);
-    FilesUtility::deleteFile ("fooc");
+
+    try
+      {
+        FilesUtility::deleteFile ("fooc");
+      }
+    catch (...)
+      {
+      }
 
     CPPUNIT_ASSERT (!message1.compare (gotMessage1));
     CPPUNIT_ASSERT (!message.compare (gotMessage));
@@ -361,7 +466,14 @@ public:
   void testCountSingleLogStream ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "console://stdout", filters, 0);
     lm->add (this, "test_1", "console://stderr", filters, 0);
@@ -373,7 +485,14 @@ public:
   void testCountSameTypeLogStreams ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "console://stdout", filters, 0);
     lm->add (this, "test_1", "console://stderr", filters, 0);
@@ -385,7 +504,14 @@ public:
   void testCountAllLogStreamsOwnedByAnObject ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "console://stdout", filters, 0);
     lm->add (this, "test_1", "console://stderr", filters, 0);
@@ -406,7 +532,14 @@ public:
     list<string> filters;
     list<string> tmp;
     list<string> l;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (this, "test", "console://stdout", filters, 0);
@@ -426,7 +559,14 @@ public:
     list<string> filters;
     list<string> tmp;
     list<string> l;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (this, "test", "console://stdout", filters, 0);
@@ -444,7 +584,14 @@ public:
   {
     list<string> filters;
     LogStream* ls;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
 
@@ -455,7 +602,14 @@ public:
   {
     list<string> filters;
     LogStream* ls;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
 
@@ -472,7 +626,13 @@ public:
     u_long nbr;
     ostringstream oss;
 
-    FilesUtility::deleteFile ("fooa");
+    try
+      {
+        FilesUtility::deleteFile ("fooa");
+      }
+    catch (...)
+      {
+      }
 
     oss << "message1" << endl;
     message1.assign (oss.str ());
@@ -490,7 +650,13 @@ public:
     f.close ();
     buf[nbr] = '\0';
 
-    FilesUtility::deleteFile ("fooa");
+    try
+      {
+        FilesUtility::deleteFile ("fooa");
+      }
+    catch (...)
+      {
+      }
 
     CPPUNIT_ASSERT (!string (buf).compare (message1.append (message2)));
   }
@@ -498,7 +664,14 @@ public:
   void testFileStreamAddWithNotExistingFilter ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
+
     filters.push_back ("not_existing_filter");
 
     CPPUNIT_ASSERT (lm->add (this, "test", "file://foo", filters, 0));
@@ -533,7 +706,14 @@ public:
   void testAddMultipleTimesTheSameKey ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
 
@@ -544,7 +724,14 @@ public:
   {
     list<string> filters;
     AnObject anObject;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
 
@@ -554,10 +741,17 @@ public:
   void testAddLogStreamSharedByTheSameObject ()
   {
     list<string> filters;
+    try
+      {
     FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
+
     lm->add (this, "test", "file://foo", filters, 0);
 
-    CPPUNIT_ASSERT (!lm->add (this, "test1", "file://foo", filters, 0));
+    CPPUNIT_ASSERT (! lm->add (this, "test1", "file://foo", filters, 0));
   }
 
   void testGetLogStreamSharedByDistinctObjects ()
@@ -567,7 +761,14 @@ public:
     list<const void*> l;
     LogStream* ls;
     LogStream* ls1;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (&anObject, "test", "file://foo", filters, 0);
@@ -584,7 +785,14 @@ public:
     list<const void*> l;
     LogStream* ls;
     LogStream* ls1;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (this, "test1", "file://foo", filters, 0);
@@ -601,7 +809,14 @@ public:
     AnObject anObject;
     AnObject anotherObject;
     list<const void*> l;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (&anObject, "test1", "file://foo", filters, 0);
@@ -632,7 +847,14 @@ public:
   void testLogOnAClosedLogStream ()
   {
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->close (this, "test", "file://foo");
@@ -644,7 +866,15 @@ public:
   {
 #ifndef WIN32
     list<string> filters;
-    FilesUtility::deleteFile ("foo");
+
+    try
+      {
+        FilesUtility::deleteFile ("foo");
+      }
+    catch (...)
+      {
+      }
+
 
     lm->add (this, "test", "file://foo", filters, 0);
     ostringstream uidOss;
@@ -659,14 +889,6 @@ public:
 #endif
   }
 
-  void tearDown ()
-  {
-    lm->close (this, "test", "file://foo");
-    delete lm;
-    delete ff;
-    FilesUtility::deleteFile ("foo");
-  }
-
 private:
   LogManager* lm;
   FiltersFactory* ff;
diff --git a/myserver/tests/test_log_stream_factory.cpp 
b/myserver/tests/test_log_stream_factory.cpp
index 3d4886b..69cafd8 100644
--- a/myserver/tests/test_log_stream_factory.cpp
+++ b/myserver/tests/test_log_stream_factory.cpp
@@ -69,8 +69,20 @@ public:
     CPPUNIT_ASSERT (!ls);
     ls = lsf->create (&ff, "console://stdout", filters, 0);
     CPPUNIT_ASSERT (ls);
-    CPPUNIT_ASSERT (!lsf->create (&ff, "socket://" LOCALHOST_ADDRESS ":0",
-                                  filters, 0));
+
+    bool success = false;
+    try
+      {
+        lsf->create (&ff, "socket://" LOCALHOST_ADDRESS ":0",
+                     filters, 0);
+      }
+    catch (...)
+      {
+        success = true;
+      }
+
+    CPPUNIT_ASSERT (success);
+
     delete ls;
   }
 
diff --git a/myserver/tests/test_socket_pair.cpp 
b/myserver/tests/test_socket_pair.cpp
index 0c2b740..509e409 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -26,6 +26,9 @@
 #include "../include/base/file/file.h"
 #include "../include/base/file/files_utility.h"
 
+#include "../include/base/exceptions/exceptions.h"
+
+
 #include <string.h>
 
 using namespace std;
@@ -58,7 +61,7 @@ public:
     CPPUNIT_ASSERT_EQUAL (sp.getFirstHandle (), inverted.getSecondHandle ());
     CPPUNIT_ASSERT_EQUAL (sp.getSecondHandle (), inverted.getFirstHandle ());
 
-    sp.close ();
+    inverted.resetHandles ();
   }
   /* FIXME: generalize for other classes that inherit from File.  */
   void testFastCopyToSocket ()
@@ -127,7 +130,6 @@ public:
     writeSock.create ();
     writeSock.inverted (readSock);
 
-
     ret = writeSock.write (inBuffer, strlen (inBuffer) + 1, &nbw);
 
     CPPUNIT_ASSERT_EQUAL (ret, 0);
@@ -139,7 +141,7 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (strcmp (inBuffer, outBuffer), 0);
 
-    writeSock.close ();
+    readSock.resetHandles ();
   }
 
 };
diff --git a/myserver/tests/test_socket_stream_creator.cpp 
b/myserver/tests/test_socket_stream_creator.cpp
index abc53df..6a92453 100644
--- a/myserver/tests/test_socket_stream_creator.cpp
+++ b/myserver/tests/test_socket_stream_creator.cpp
@@ -46,8 +46,18 @@ public:
   void testCreation ()
   {
     list<string> filters;
-    LogStream* ls = ssc->create (ff, LOCALHOST_ADDRESS ":0", filters, 0);
-    CPPUNIT_ASSERT (!ls);
+    bool success = false;
+
+    try
+      {
+        LogStream* ls = ssc->create (ff, LOCALHOST_ADDRESS ":0", filters, 0);
+      }
+    catch (...)
+      {
+        success = true;
+      }
+
+    CPPUNIT_ASSERT (success);
   }
 
   void testGetPort ()



commit b9aa4ca51c64da117ca372dae34501544c1c5512
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 12:02:06 2010 +0200

    Link statically the test suite program

diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 66095c6..bed6775 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -87,6 +87,8 @@ test_suite_LDADD = ../src/libmyserver.la  ../lib/libgnu.la 
$(CPPUNIT_LDFLAGS) \
        $(PTHREAD_LIB)  $(IDN_LIB) $(XNET_LIB) $(DL_LIB) $(ZLIB_LIB) \
        $(XML_LIBS) $(INTLLIBS) $(LDFLAGS)
 
+test_suite_LDFLAGS = -static
+
 install:
 
 check-am:



commit 28f364b73b0631ef93153c6f1951f87f808ba208
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 11:34:16 2010 +0200

    Use the right prototype for `gettimeofday'.

diff --git a/myserver/include/base/exceptions/checked.h 
b/myserver/include/base/exceptions/checked.h
index 7220b73..4ceb64a 100644
--- a/myserver/include/base/exceptions/checked.h
+++ b/myserver/include/base/exceptions/checked.h
@@ -92,7 +92,7 @@ namespace checked
   char *getcwd (char *buf, size_t size);
   int gethostname (char *name, size_t len);
   int getsockname (int fd, struct sockaddr *addr, socklen_t *addrlen);
-  int gettimeofday (struct timeval *, void *);
+  int gettimeofday (struct timeval *tv, struct timezone *tz);
   struct tm *gmtime_r (time_t const *__timer, struct tm *__result);
   int listen (int fd, int backlog);
   struct tm *localtime_r (time_t const *__timer, struct tm *__result);



commit be52d78a003b9a4d4b40ca3727273beb59bbc66b
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 11:28:10 2010 +0200

    Move `checkError' and `checkErrorNull' to checked.h

diff --git a/myserver/include/base/exceptions/checked.h 
b/myserver/include/base/exceptions/checked.h
index 28f406c..7220b73 100644
--- a/myserver/include/base/exceptions/checked.h
+++ b/myserver/include/base/exceptions/checked.h
@@ -49,6 +49,35 @@
  */
 namespace checked
 {
+  void raiseException ();
+
+  /*!
+   * Check if the last operation was successful, the operation is consider
+   * successful if the return value is >= 0.
+   *
+   * \param x The function's return value
+   */
+  static inline int checkError (int x)
+  {
+    if (x < 0)
+      checked::raiseException ();
+
+    return x;
+  }
+
+  /*!
+   * Check if the last operation was successful, the operation is consider
+   * successful if the return value is != NULL.
+   *
+   * \param x The function's return value
+   */
+  static inline const void *checkErrorNull (const void *x)
+  {
+    if (x == NULL)
+      checked::raiseException ();
+
+    return x;
+  }
   int accept (int fd, struct sockaddr *addr, socklen_t *addrlen);
   int bind (int fd, const struct sockaddr *addr, socklen_t addrlen);
   int chown (const char *file, uid_t uid, gid_t gid);
@@ -92,8 +121,6 @@ namespace checked
   char *strdup (char const *__s);
   int unlink (char const *file);
   ssize_t write (int fd, const void *buf, size_t count);
-
-  void raiseException ();
 }
 
 #endif
diff --git a/myserver/src/base/exceptions/checked.cpp 
b/myserver/src/base/exceptions/checked.cpp
index 7fdf2fd..f09df20 100644
--- a/myserver/src/base/exceptions/checked.cpp
+++ b/myserver/src/base/exceptions/checked.cpp
@@ -19,29 +19,6 @@
 */
 #include <include/base/exceptions/checked.h>
 
-/*!
- * Check if the last operation was successful
- * \param x The function's return value
- */
-static inline int checkError (int x)
-{
-  if (x < 0)
-    checked::raiseException ();
-
-  return x;
-}
-
-/*!
- * \see checkError
- */
-static inline const void *checkErrorNull (const void *x)
-{
-  if (x == NULL)
-    checked::raiseException ();
-
-  return x;
-}
-
 namespace checked
 {
   int accept (int fd, struct sockaddr *addr, socklen_t *addrlen)



commit 53fe1d953e77c08d51be14b0a6e37ccdfe31c75c
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 11:05:20 2010 +0200

    Add `pipe2' to the `checked' namespace.

diff --git a/myserver/include/base/exceptions/checked.h 
b/myserver/include/base/exceptions/checked.h
index 7009ee1..28f406c 100644
--- a/myserver/include/base/exceptions/checked.h
+++ b/myserver/include/base/exceptions/checked.h
@@ -57,6 +57,7 @@ namespace checked
   int connect (int fd, const struct sockaddr *addr, socklen_t addrlen);
   int dup (int oldfd);
   int dup2 (int oldfd, int newfd);
+  int pipe2 (int pipefd[2], int flags);
   int fstat (int fd, struct stat *buf);
   int fstatat (int fd, char const *name, struct stat *st, int flags);
   char *getcwd (char *buf, size_t size);
diff --git a/myserver/src/base/exceptions/checked.cpp 
b/myserver/src/base/exceptions/checked.cpp
index 555fd0e..7fdf2fd 100644
--- a/myserver/src/base/exceptions/checked.cpp
+++ b/myserver/src/base/exceptions/checked.cpp
@@ -84,6 +84,11 @@ namespace checked
     return checkError (gnulib::dup2 (oldfd, newfd));
   }
 
+  int pipe2 (int pipefd[2], int flags)
+  {
+    return checkError (pipe2 (pipefd, flags));
+  }
+
   int fstat (int fd, struct stat *buf)
   {
     return checkError (gnulib::fstat (fd, buf));



commit 00d9db47fec81591111a5569e333cc0fa59166e7
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 10:43:11 2010 +0200

    Now`open' accepts the user mask.

diff --git a/myserver/include/base/exceptions/checked.h 
b/myserver/include/base/exceptions/checked.h
index 11e69a1..7009ee1 100644
--- a/myserver/include/base/exceptions/checked.h
+++ b/myserver/include/base/exceptions/checked.h
@@ -70,7 +70,7 @@ namespace checked
   void *memchr (void const *__s, int __c, size_t __n);
   int mkdir (char const *name, mode_t mode);
   time_t mktime (struct tm *__tp);
-  int open (const char *filename, int flags);
+  int open (const char *filename, int flags, int mask = 0);
   DIR *opendir (const char *);
   int fsync (int fd);
   ssize_t read (int fd, void *buf, size_t count);
diff --git a/myserver/src/base/exceptions/checked.cpp 
b/myserver/src/base/exceptions/checked.cpp
index 939e0ff..555fd0e 100644
--- a/myserver/src/base/exceptions/checked.cpp
+++ b/myserver/src/base/exceptions/checked.cpp
@@ -149,9 +149,9 @@ namespace checked
     return checkError (gnulib::mktime (__tp));
   }
 
-  int open (const char *filename, int flags)
+  int open (const char *filename, int flags, int mask)
   {
-    return checkError (gnulib::open (filename, flags, 0));
+    return checkError (gnulib::open (filename, flags, mask));
   }
 
   DIR *opendir (const char *name)



commit 8accbb8a011f574daff78e97c01f72b674dcdf7f
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 15 10:35:51 2010 +0200

    Add `fsync' to the `checked' namespace.

diff --git a/myserver/include/base/exceptions/checked.h 
b/myserver/include/base/exceptions/checked.h
index 88a680a..11e69a1 100644
--- a/myserver/include/base/exceptions/checked.h
+++ b/myserver/include/base/exceptions/checked.h
@@ -72,6 +72,7 @@ namespace checked
   time_t mktime (struct tm *__tp);
   int open (const char *filename, int flags);
   DIR *opendir (const char *);
+  int fsync (int fd);
   ssize_t read (int fd, void *buf, size_t count);
   void *realloc (void *ptr, size_t size);
   ssize_t recv (int fd, void *buf, size_t len, int flags);
diff --git a/myserver/src/base/exceptions/checked.cpp 
b/myserver/src/base/exceptions/checked.cpp
index 541596e..939e0ff 100644
--- a/myserver/src/base/exceptions/checked.cpp
+++ b/myserver/src/base/exceptions/checked.cpp
@@ -164,6 +164,12 @@ namespace checked
     return checkError (::read (fd, buf, count));
   }
 
+  int fsync (int fd)
+  {
+    return checkError (gnulib::fsync (fd));
+  }
+
+
   void *realloc (void *ptr, size_t size)
   {
     return (void *) checkErrorNull (gnulib::realloc (ptr, size));

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

Summary of changes:
 myserver/include/base/exceptions/checked.h         |   37 +++-
 myserver/include/base/socket_pair/socket_pair.h    |    2 +
 myserver/po/Makevars                               |   13 +-
 myserver/src/base/base64/mime_utils.cpp            |    3 +-
 myserver/src/base/exceptions/checked.cpp           |   38 +--
 myserver/src/base/file/file.cpp                    |   17 +-
 myserver/src/base/file/files_utility.cpp           |   16 +-
 myserver/src/base/pipe/pipe.cpp                    |   27 +-
 myserver/src/base/process/fork_server.cpp          |   23 +-
 myserver/src/base/process/process.cpp              |   33 ++-
 .../src/base/read_directory/read_directory.cpp     |    7 +-
 myserver/src/base/safetime/safetime.cpp            |    5 +-
 myserver/src/base/socket/socket.cpp                |   35 ++--
 myserver/src/base/socket/ssl_socket.cpp            |   10 +-
 myserver/src/base/socket_pair/socket_pair.cpp      |   42 ++--
 myserver/src/base/ssl/ssl.cpp                      |    2 +
 myserver/src/base/string/stringutils.cpp           |    4 +-
 myserver/src/base/sync/event.cpp                   |    3 +-
 myserver/src/base/sync/mutex.cpp                   |    8 -
 myserver/src/base/unix_socket/unix_socket.cpp      |   12 +-
 myserver/src/base/utility.cpp                      |    7 +-
 .../connections_scheduler.cpp                      |  296 ++++++++++++-------
 myserver/src/log/log_manager.cpp                   |  122 +++++----
 myserver/src/myserver.cpp                          |   20 +-
 myserver/src/plugin/plugins_manager.cpp            |   13 +-
 myserver/src/protocol/ftp/ftp.cpp                  |    4 +-
 myserver/src/protocol/http/http.cpp                |   25 +-
 myserver/src/server/clients_thread.cpp             |   12 +-
 myserver/tests/Makefile.am                         |    2 +
 myserver/tests/test_connection.cpp                 |    1 -
 myserver/tests/test_connections_scheduler.cpp      |   37 ++--
 myserver/tests/test_file.cpp                       |   34 ++-
 myserver/tests/test_file_stream.cpp                |   39 ++-
 myserver/tests/test_log_manager.cpp                |  304 +++++++++++++++++---
 myserver/tests/test_log_stream_factory.cpp         |   16 +-
 myserver/tests/test_socket_pair.cpp                |    8 +-
 myserver/tests/test_socket_stream_creator.cpp      |   14 +-
 37 files changed, 882 insertions(+), 409 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]