gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37064 - in libmicrohttpd: . src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37064 - in libmicrohttpd: . src/microhttpd
Date: Fri, 22 Apr 2016 17:03:27 +0200

Author: Karlson2k
Date: 2016-04-22 17:03:27 +0200 (Fri, 22 Apr 2016)
New Revision: 37064

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/microhttpd/daemon.c
Log:
Fixed race conditions for thread pool.

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2016-04-22 14:26:17 UTC (rev 37063)
+++ libmicrohttpd/ChangeLog     2016-04-22 15:03:27 UTC (rev 37064)
@@ -1,3 +1,7 @@
+Fri Apr 22 14:29:28 CET 2016
+       Fixed race conditions when stopping quiesced daemon with thread
+       pool. -EG
+
 Wed Apr 20 18:12:30 CET 2016
        Fixed macros in sysfdsetsize.c which could prevent compiling with
        non-default FD_SETSIZE.

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2016-04-22 14:26:17 UTC (rev 
37063)
+++ libmicrohttpd/src/microhttpd/daemon.c       2016-04-22 15:03:27 UTC (rev 
37064)
@@ -4306,7 +4306,8 @@
           d->worker_pool_size = 0;
           d->worker_pool = NULL;
 
-          if (MHD_USE_SUSPEND_RESUME == (flags & MHD_USE_SUSPEND_RESUME))
+          /* Always use individual control pipes */
+          if (1)
             {
               if (0 != MHD_pipe_ (d->wpipe))
                 {
@@ -4330,7 +4331,6 @@
             }
 #ifndef MHD_WINSOCK_SOCKETS
           if ( (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL_LINUX_ONLY))) &&
-               (MHD_USE_SUSPEND_RESUME == (flags & MHD_USE_SUSPEND_RESUME)) &&
                (d->wpipe[0] >= FD_SETSIZE) )
             {
 #ifdef HAVE_MESSAGES
@@ -4650,7 +4650,8 @@
               (0 != MHD_socket_close_ (daemon->worker_pool[i].epoll_fd)) )
            MHD_PANIC ("close failed\n");
 #endif
-          if ( (MHD_USE_SUSPEND_RESUME == (daemon->options & 
MHD_USE_SUSPEND_RESUME)) )
+          /* Individual pipes are always used */
+          if (1)
             {
               if (MHD_INVALID_PIPE_ != daemon->worker_pool[i].wpipe[1])
                 {




reply via email to

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