gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r34162 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r34162 - libmicrohttpd/src/microhttpd
Date: Sun, 17 Aug 2014 16:17:43 +0200

Author: amatus
Date: 2014-08-17 16:17:43 +0200 (Sun, 17 Aug 2014)
New Revision: 34162

Modified:
   libmicrohttpd/src/microhttpd/connection.c
Log:
Do not move a connection between timeout lists if it is suspended

When a connection is suspended it is not in a timeout list.


Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c   2014-08-17 12:07:41 UTC (rev 
34161)
+++ libmicrohttpd/src/microhttpd/connection.c   2014-08-17 14:17:43 UTC (rev 
34162)
@@ -2869,25 +2869,29 @@
       if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
           (MHD_YES != MHD_mutex_lock_ (&daemon->cleanup_connection_mutex)) )
        MHD_PANIC ("Failed to acquire cleanup mutex\n");
-      if (connection->connection_timeout == daemon->connection_timeout)
-       XDLL_remove (daemon->normal_timeout_head,
-                    daemon->normal_timeout_tail,
-                    connection);
-      else
-       XDLL_remove (daemon->manual_timeout_head,
-                    daemon->manual_timeout_tail,
-                    connection);
+      if (MHD_YES != connection->suspended) {
+        if (connection->connection_timeout == daemon->connection_timeout)
+          XDLL_remove (daemon->normal_timeout_head,
+                       daemon->normal_timeout_tail,
+                       connection);
+        else
+          XDLL_remove (daemon->manual_timeout_head,
+                       daemon->manual_timeout_tail,
+                       connection);
+      }
       va_start (ap, option);
       connection->connection_timeout = va_arg (ap, unsigned int);
       va_end (ap);
-      if (connection->connection_timeout == daemon->connection_timeout)
-       XDLL_insert (daemon->normal_timeout_head,
-                    daemon->normal_timeout_tail,
-                    connection);
-      else
-       XDLL_insert (daemon->manual_timeout_head,
-                    daemon->manual_timeout_tail,
-                    connection);
+      if (MHD_YES != connection->suspended) {
+        if (connection->connection_timeout == daemon->connection_timeout)
+          XDLL_insert (daemon->normal_timeout_head,
+                       daemon->normal_timeout_tail,
+                       connection);
+        else
+          XDLL_insert (daemon->manual_timeout_head,
+                       daemon->manual_timeout_tail,
+                       connection);
+      }
       if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
           (MHD_YES != MHD_mutex_unlock_ (&daemon->cleanup_connection_mutex)) )
        MHD_PANIC ("Failed to release cleanup mutex\n");




reply via email to

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