gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r34936 - in libmicrohttpd: . src/include src/microhttpd
Date: Sun, 18 Jan 2015 20:12:14 +0100

Author: grothoff
Date: 2015-01-18 20:12:14 +0100 (Sun, 18 Jan 2015)
New Revision: 34936

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/include/microhttpd.h
   libmicrohttpd/src/microhttpd/daemon.c
Log:
fix infinite loop reported by Dominic Froud

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2015-01-18 17:31:14 UTC (rev 34935)
+++ libmicrohttpd/ChangeLog     2015-01-18 19:12:14 UTC (rev 34936)
@@ -1,3 +1,7 @@
+Sun Jan 18 20:09:06 CET 2015
+       Fix potential infinite loop on shutdown in multi-threaded mode
+       under certain conditions. -CG
+
 Mon Dec 22 16:33:18 CET 2014
        Releasing 0.9.39. -CG
 

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2015-01-18 17:31:14 UTC (rev 
34935)
+++ libmicrohttpd/src/include/microhttpd.h      2015-01-18 19:12:14 UTC (rev 
34936)
@@ -130,7 +130,7 @@
  * Current version of the library.
  * 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00093900
+#define MHD_VERSION 0x00093901
 
 /**
  * MHD-internal return code for "YES".
@@ -170,7 +170,7 @@
 #define _MHD_EXTERN extern
 #elif defined (_WIN32) && defined(MHD_W32DLL)
 /* Define MHD_W32DLL when using MHD as W32 .DLL to speed up linker a little */
-#define _MHD_EXTERN __declspec(dllimport) 
+#define _MHD_EXTERN __declspec(dllimport)
 #else
 #define _MHD_EXTERN extern
 #endif

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2015-01-18 17:31:14 UTC (rev 
34935)
+++ libmicrohttpd/src/microhttpd/daemon.c       2015-01-18 19:12:14 UTC (rev 
34936)
@@ -4154,7 +4154,7 @@
   /* now, collect threads from thread pool */
   if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
     {
-      while (NULL != (pos = daemon->connections_head))
+      for (pos = daemon->connections_head; NULL != pos; pos = pos->next)
        {
          if (0 != MHD_join_thread_ (pos->pid))
            MHD_PANIC ("Failed to join a thread\n");
@@ -4633,4 +4633,3 @@
 _SET_INIT_AND_DEINIT_FUNCS(MHD_init, MHD_fini);
 
 /* end of daemon.c */
-




reply via email to

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