gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (47281241 -> 777d5e04


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (47281241 -> 777d5e04)
Date: Mon, 29 Oct 2018 20:37:23 +0100

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

grothoff pushed a change to branch master
in repository libmicrohttpd.

    from 47281241 notify main thread about thread termination for instant clean 
up
     new 533124d3 fix possibly bad clearing of client_aware flag
     new 777d5e04 force setting MHD_USE_ITC if using thread-per-connection and 
notify_completed for timely notifications

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/microhttpd/daemon.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 0480af95..cd2ca189 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2875,11 +2875,13 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
           if ( (NULL != daemon->notify_completed) &&
                (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
                (pos->client_aware) )
-            daemon->notify_completed (daemon->notify_completed_cls,
-                                      pos,
-                                      &pos->client_context,
-                                      MHD_REQUEST_TERMINATED_COMPLETED_OK);
-          pos->client_aware = false;
+           {
+             daemon->notify_completed (daemon->notify_completed_cls,
+                                       pos,
+                                       &pos->client_context,
+                                       MHD_REQUEST_TERMINATED_COMPLETED_OK);
+             pos->client_aware = false;
+           }
           DLL_insert (daemon->cleanup_head,
                       daemon->cleanup_tail,
                       pos);
@@ -3431,8 +3433,9 @@ MHD_run_from_select (struct MHD_Daemon *daemon,
   if (0 != (daemon->options & MHD_USE_EPOLL))
     {
 #ifdef EPOLL_SUPPORT
-      int ret;
-      ret = MHD_epoll (daemon, MHD_NO);
+      int ret = MHD_epoll (daemon,
+                          MHD_NO);
+ 
       MHD_cleanup_connections (daemon);
       return ret;
 #else  /* ! EPOLL_SUPPORT */
@@ -5528,9 +5531,15 @@ MHD_start_daemon_va (unsigned int flags,
       free (daemon);
       return NULL;
     }
+
+  if ( (NULL != daemon->notify_completed) &&
+       (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) )
+    *pflags |= MHD_USE_ITC; /* requires ITC */    
+  
 #ifndef NDEBUG
 #ifdef HAVE_MESSAGES
-  MHD_DLOG (daemon,  _("Using debug build of libmicrohttpd.\n") );
+  MHD_DLOG (daemon,
+           _("Using debug build of libmicrohttpd.\n") );
 #endif /* HAVE_MESSAGES */
 #endif /* ! NDEBUG */
 

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



reply via email to

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