gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37097 - in branches/mhd-0.9.50: . src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37097 - in branches/mhd-0.9.50: . src/microhttpd
Date: Fri, 29 Apr 2016 23:14:34 +0200

Author: Karlson2k
Date: 2016-04-29 23:14:34 +0200 (Fri, 29 Apr 2016)
New Revision: 37097

Modified:
   branches/mhd-0.9.50/ChangeLog
   branches/mhd-0.9.50/src/microhttpd/daemon.c
Log:
Fixed race conditions for thread pool.

Modified: branches/mhd-0.9.50/ChangeLog
===================================================================
--- branches/mhd-0.9.50/ChangeLog       2016-04-29 21:14:31 UTC (rev 37096)
+++ branches/mhd-0.9.50/ChangeLog       2016-04-29 21:14:34 UTC (rev 37097)
@@ -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: branches/mhd-0.9.50/src/microhttpd/daemon.c
===================================================================
--- branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:31 UTC (rev 
37096)
+++ branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:34 UTC (rev 
37097)
@@ -4293,7 +4293,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))
                 {
@@ -4317,7 +4318,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
@@ -4637,7 +4637,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]