gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: return timeout of 0 if cleanup is


From: gnunet
Subject: [libmicrohttpd] branch master updated: return timeout of 0 if cleanup is pending
Date: Wed, 06 Jan 2021 20:43:56 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new b1691240 return timeout of 0 if cleanup is pending
b1691240 is described below

commit b16912401788773e4f608f107621902100b85515
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jan 6 20:41:58 2021 +0100

    return timeout of 0 if cleanup is pending
---
 ChangeLog                | 5 ++++-
 src/include/microhttpd.h | 8 ++++----
 src/microhttpd/daemon.c  | 5 ++---
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f35b351a..4ab2a5fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+Wed 06 Jan 2021 08:39:58 PM CET
+    Return timeout of zero also for connections awaiting cleanup. -CG
+
 Mon 28 Dec 2020 21:36:00 MSK
     Releasing libmicrohttpd 0.9.72. -EG
 
@@ -26,7 +29,7 @@ Sun 01 Nov 2020 17:17:00 MSK
     Minor improvements of error reporting in MHD daemon.
     Fixed FTBFS with GnuTLS versions before 3.1.9
     Fixed test_add_conn for multi-CPU machines.
-    Fixed analyzer warnings. 
+    Fixed analyzer warnings.
     Fixed use-after-free and resources leaks for upgraded connections
     in TLS mode with thread-per-connection. -EG
 
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 9dc83fb3..2f76a1ec 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -133,7 +133,7 @@ typedef intptr_t ssize_t;
  * @note While it is a hexadecimal number, it is parsed as decimal number.
  * Example: 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00097201
+#define MHD_VERSION 0x00097202
 
 /**
  * Operational results from MHD calls.
@@ -222,12 +222,12 @@ typedef SOCKET MHD_socket;
 #define _MHD_INSTRMACRO(a) #a
 #define _MHD_STRMACRO(a) _MHD_INSTRMACRO (a)
 /* deprecation message */
-#define _MHD_DEPR_MACRO(msg) __pragma (message (__FILE__ "(" _MHD_STRMACRO ( \
-                                                  __LINE__) "): warning: " 
msg))
+#define _MHD_DEPR_MACRO(msg) __pragma(message (__FILE__ "(" _MHD_STRMACRO ( \
+  __LINE__) "): warning: " msg))
 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
 #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
 /* clang or GCC since 3.0 */
-#define _MHD_GCC_PRAG(x) _Pragma (#x)
+#define _MHD_GCC_PRAG(x) _Pragma(#x)
 #if (defined(__clang__) && (__clang_major__ + 0 >= 5 ||     \
                             (! defined(__apple_build_version__) && \
   (__clang_major__ + 0  > 3 || (__clang_major__ + 0 == 3 && __clang_minor__ >= 
\
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 021f1d6f..cae031bd 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3275,7 +3275,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
       DLL_insert (daemon->cleanup_head,
                   daemon->cleanup_tail,
                   pos);
-
+      daemon->data_already_pending = true;
     }
 #endif /* UPGRADE_SUPPORT */
     pos->resuming = false;
@@ -3770,14 +3770,12 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
 #endif
     return MHD_NO;
   }
-
   if (daemon->data_already_pending)
   {
     /* Some data already waiting to be processed. */
     *timeout = 0;
     return MHD_YES;
   }
-
 #ifdef EPOLL_SUPPORT
   if ( (0 != (daemon->options & MHD_USE_EPOLL)) &&
        ((NULL != daemon->eready_head)
@@ -5090,6 +5088,7 @@ close_connection (struct MHD_Connection *pos)
   DLL_insert (daemon->cleanup_head,
               daemon->cleanup_tail,
               pos);
+  daemon->data_already_pending = true;
 #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
   MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
 #endif

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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