gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: Improved thread-safe


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Improved thread-safe for MHD_set_connection_option()
Date: Thu, 16 Mar 2017 19:58:27 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new ac82c4d3 Improved thread-safe for MHD_set_connection_option()
ac82c4d3 is described below

commit ac82c4d331f864f2100db4c3ffce16a5c34042e7
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Mar 16 21:58:16 2017 +0300

    Improved thread-safe for MHD_set_connection_option()
---
 src/microhttpd/connection.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 20bde652..c3c7be8b 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3373,6 +3373,7 @@ MHD_set_connection_option (struct MHD_Connection 
*connection,
   switch (option)
     {
     case MHD_CONNECTION_OPTION_TIMEOUT:
+      MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
       if ( (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
           (! connection->suspended) )
         {
@@ -3401,6 +3402,7 @@ MHD_set_connection_option (struct MHD_Connection 
*connection,
                           daemon->manual_timeout_tail,
                           connection);
         }
+      MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
       return MHD_YES;
     default:
       return MHD_NO;

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



reply via email to

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