gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: Fix at-limit race


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Fix at-limit race
Date: Tue, 26 Sep 2017 14:03:43 +0200

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 f69ca10d Fix at-limit race
f69ca10d is described below

commit f69ca10dd01da206a174730f8f923d3d3bd61492
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Sep 26 14:04:37 2017 +0200

    Fix at-limit race
---
 ChangeLog               | 11 +++++++----
 src/microhttpd/daemon.c |  2 ++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b400bb65..92dd8736 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+Tue Sep 26 14:00:58 CEST 2017
+       Fixing race involving setting "at_limit" flag. -CG
+
 Tue Sep 08 21:39:00 MSK 2017
        Fixed build of examples when MHD build with non-pthread lib.
        MHD_queue_response(): added check for using in correct thread.
@@ -19,7 +22,7 @@ Tue Jun 20 23:52:00 MSK 2017
        Libgcrypt is now optional and required only for old GnuTLS versions. -EG
 
 Wed Jun 14 21:42:00 MSK 2017
-       Added support for debug assert() and new configure parameter 
+       Added support for debug assert() and new configure parameter
        --enable-asserts for debug builds.
        Removed non-functional Symbian support. -EG
 
@@ -37,7 +40,7 @@ Mon Jun 05 23:34:00 MSK 2017
 Mon Jun 05 22:20:00 MSK 2017
        Internal refactoring:
        used TCP sockets directly with GnuTLS (performance improvement),
-       moved some connection-related code from daemon.c to 
+       moved some connection-related code from daemon.c to
        connection.c/connection_https.c,
        removed hacks around sendfile() and implemented correct support of
        sendfile(),
@@ -82,7 +85,7 @@ Thu May 11 14:24:00 MSK 2017
        Do not add any "Connection" headers for "upgrade" connections. -EG
 
 Wed May 10 23:09:00 MSK 2017
-       Resume resuming connection before other processing in external polling 
+       Resume resuming connection before other processing in external polling
        mode. -EG
 
 Tue May  9 23:16:00 MSK 2017
@@ -103,7 +106,7 @@ Mon May  8 19:30:00 MSK 2017
        MHD_get_response_header(), match only headers (not footers). -EG
 
 Fri May  5 20:57:00 MSK 2017
-       Fixed null dereference when connection has "Upgrade" request and 
+       Fixed null dereference when connection has "Upgrade" request and
        connection is not upgraded.  -JB/EG
        Better handle Keep-Alive/Close. -EG
 
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 18bfc7a8..fb363caa 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2910,7 +2910,9 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
             }
           else
             {
+              MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
               daemon->at_limit = true;
+              MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
 #ifdef HAVE_MESSAGES
               MHD_DLOG (daemon,
                         _("Hit process or system resource limit at %u 
connections, temporarily suspending accept(). Consider setting a lower 
MHD_OPTION_CONNECTION_LIMIT.\n"),

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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