gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9155 - in libmicrohttpd: . src/daemon


From: gnunet
Subject: [GNUnet-SVN] r9155 - in libmicrohttpd: . src/daemon
Date: Wed, 14 Oct 2009 06:14:14 -0600

Author: grothoff
Date: 2009-10-14 06:14:14 -0600 (Wed, 14 Oct 2009)
New Revision: 9155

Modified:
   libmicrohttpd/AUTHORS
   libmicrohttpd/src/daemon/daemon.c
Log:
From: 
Mike Crowe <address@hidden>
  To: 
  address@hidden
    Date: 
    Yesterday 16:48:20
       
I've looked at the fix in SVN. Unfortunately pthread_join returns an
error rather than setting errno. :( This caused me confusion recently
too.

Here's a patch that fixes this. It passed 'make check' modulo the curl
error 66 put failures that seem to happen for me regardless:



Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS       2009-10-14 12:10:50 UTC (rev 9154)
+++ libmicrohttpd/AUTHORS       2009-10-14 12:14:14 UTC (rev 9155)
@@ -20,8 +20,8 @@
 David Carvalho <address@hidden>
 David Reiss <address@hidden>
 Mika Raento <address@hidden>
+Mike Crowe <address@hidden>
 
-
 Documentation contributions also came from:
 Marco Maggi <address@hidden>
 Sebastian Gerhardt <address@hidden>

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2009-10-14 12:10:50 UTC (rev 9154)
+++ libmicrohttpd/src/daemon/daemon.c   2009-10-14 12:14:14 UTC (rev 9155)
@@ -763,6 +763,7 @@
   struct MHD_Connection *pos;
   struct MHD_Connection *prev;
   void *unused;
+  int rc;
 
   pos = daemon->connections;
   prev = NULL;
@@ -779,11 +780,11 @@
           if (0 != (pos->daemon->options & MHD_USE_THREAD_PER_CONNECTION))
             {
              pthread_kill (pos->pid, SIGALRM);
-              if (0 != pthread_join (pos->pid, &unused))
+              if (0 != (rc = pthread_join (pos->pid, &unused)))
                {
 #if HAVE_MESSAGES
                  MHD_DLOG (daemon, "Failed to join a thread: %s\n",
-                           STRERROR (errno));
+                           STRERROR (rc));
 #endif
                  abort();              
                }
@@ -1475,6 +1476,7 @@
   void *unused;
   int fd;
   unsigned int i;
+  int rc;
 
   if (daemon == NULL)
     return;
@@ -1508,11 +1510,11 @@
     pthread_kill (daemon->worker_pool[i].pid, SIGALRM);
   for (i = 0; i < daemon->worker_pool_size; ++i)
     {
-      if (0 != pthread_join (daemon->worker_pool[i].pid, &unused))
+      if (0 != (rc = pthread_join (daemon->worker_pool[i].pid, &unused)))
        {
 #if HAVE_MESSAGES
          MHD_DLOG (daemon, "Failed to join a thread: %s\n",
-                   STRERROR (errno));
+                   STRERROR (rc));
 #endif
          abort();              
        }
@@ -1525,11 +1527,11 @@
         && (0 == daemon->worker_pool_size)))
     {
       pthread_kill (daemon->pid, SIGALRM);
-      if (0 != pthread_join (daemon->pid, &unused))
+      if (0 != (rc = pthread_join (daemon->pid, &unused)))
        {
 #if HAVE_MESSAGES
          MHD_DLOG (daemon, "Failed to join a thread: %s\n",
-                   STRERROR (errno));
+                   STRERROR (rc));
 #endif
          abort();
        }





reply via email to

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