gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r35503 - in libmicrohttpd: . src/include src/microhttpd src/testcurl
Date: Sat, 4 Apr 2015 18:30:00 +0200

Author: grothoff
Date: 2015-04-04 18:30:00 +0200 (Sat, 04 Apr 2015)
New Revision: 35503

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/include/microhttpd.h
   libmicrohttpd/src/microhttpd/daemon.c
   libmicrohttpd/src/testcurl/test_concurrent_stop.c
Log:
fix multi-threaded shutdown deadlock issue

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2015-04-04 16:28:34 UTC (rev 35502)
+++ libmicrohttpd/ChangeLog     2015-04-04 16:30:00 UTC (rev 35503)
@@ -1,3 +1,7 @@
+Sat Apr  4 18:28:24 CEST 2015
+       Fix potential deadlock issue in MHD_USE_THREAD_PER_CONNECTION
+       mode if shutdown is initiated while connections are active. -CG
+
 Sat Apr  4 17:48:13 CEST 2015
        Fix issue in thread-pool mode where a MHD_stop_daemon()
        might not reach threads that stopped listening because

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2015-04-04 16:28:34 UTC (rev 
35502)
+++ libmicrohttpd/src/include/microhttpd.h      2015-04-04 16:30:00 UTC (rev 
35503)
@@ -130,7 +130,7 @@
  * Current version of the library.
  * 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00093906
+#define MHD_VERSION 0x00093907
 
 /**
  * MHD-internal return code for "YES".
@@ -2643,7 +2643,7 @@
 
   /**
   * Get whether password encrypted private key for HTTPS daemon is
-  * supported. If supported then option 
+  * supported. If supported then option
   * ::MHD_OPTION_HTTPS_KEY_PASSWORD can be used.
   */
   MHD_FEATURE_HTTPS_KEY_PASSWORD = 14

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2015-04-04 16:28:34 UTC (rev 
35502)
+++ libmicrohttpd/src/microhttpd/daemon.c       2015-04-04 16:30:00 UTC (rev 
35503)
@@ -4213,6 +4213,8 @@
 
   MHD_connection_close (pos,
                        MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN);
+  if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
+    return; /* must let thread to the rest */
   if (pos->connection_timeout == pos->daemon->connection_timeout)
     XDLL_remove (daemon->normal_timeout_head,
                 daemon->normal_timeout_tail,

Modified: libmicrohttpd/src/testcurl/test_concurrent_stop.c
===================================================================
--- libmicrohttpd/src/testcurl/test_concurrent_stop.c   2015-04-04 16:28:34 UTC 
(rev 35502)
+++ libmicrohttpd/src/testcurl/test_concurrent_stop.c   2015-04-04 16:30:00 UTC 
(rev 35503)
@@ -217,7 +217,7 @@
   response = MHD_create_response_from_buffer (strlen ("/hello_world"),
                                              "/hello_world",
                                              MHD_RESPMEM_MUST_COPY);
-  // errorCount += testMultithreadedGet (port++, 0);
+  errorCount += testMultithreadedGet (port++, 0);
   errorCount += testMultithreadedPoolGet (port++, 0);
   MHD_destroy_response (response);
   if (errorCount != 0)




reply via email to

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