gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. 5c


From: gitolite
Subject: [GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. 5cc484923aef7a9223b6ecf39aa34fd4d4cbf116
Date: Fri, 28 Oct 2016 21:31:08 +0200 (CEST)

The branch, master has been updated
       via  5cc484923aef7a9223b6ecf39aa34fd4d4cbf116 (commit)
      from  cfd8cfeefaf5b60fc383dd376263f86305f6c4ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5cc484923aef7a9223b6ecf39aa34fd4d4cbf116
Author: Evgeny Grin (Karlson2k) <address@hidden>
Date:   Fri Oct 28 22:07:57 2016 +0300

    MHD_stop_daemon(): fixed: close all upgraded connections from daemon's
    thread, not from the caller thread.
    Close all upgraded connections in worker threads (for thread pool).

-----------------------------------------------------------------------

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

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 7e4efe7..7c66d1a 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -5403,6 +5403,23 @@ static void
 close_all_connections (struct MHD_Daemon *daemon)
 {
   struct MHD_Connection *pos;
+#ifdef HTTPS_SUPPORT
+  struct MHD_UpgradeResponseHandle *urh;
+  struct MHD_UpgradeResponseHandle *urhn;
+#endif /* HTTPS_SUPPORT */
+
+  /* give upgraded HTTPS connections a chance to finish */
+#if HTTPS_SUPPORT
+  for (urh = daemon->urh_head; NULL != urh; urh = urhn)
+    {
+      urhn = urh->next;
+      /* call generic forwarding function for passing data
+         with chance to detect that application is done;
+         fake read readyness just to be sure. */
+      urh->mhd.celi |= MHD_EPOLL_STATE_READ_READY;
+      process_urh (urh);
+    }
+#endif
 
   /* Give suspended connections a chance to resume to avoid
      running into the check for there not being any suspended
@@ -5501,26 +5518,10 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
 {
   MHD_socket fd;
   unsigned int i;
-#if HTTPS_SUPPORT
-  struct MHD_UpgradeResponseHandle *urh;
-  struct MHD_UpgradeResponseHandle *urhn;
-#endif
 
   if (NULL == daemon)
     return;
 
-  /* give upgraded HTTPS connections a chance to finish */
-#if HTTPS_SUPPORT
-  for (urh = daemon->urh_head; NULL != urh; urh = urhn)
-    {
-      urhn = urh->next;
-      /* call generic forwarding function for passing data
-         with chance to detect that application is done;
-         fake read readyness just to be sure. */
-      urh->mhd.celi |= MHD_EPOLL_STATE_READ_READY;
-      process_urh (urh);
-    }
-#endif
   if (0 != (MHD_USE_SUSPEND_RESUME & daemon->options))
     resume_suspended_connections (daemon);
 


hooks/post-receive
-- 
GNU libmicrohttpd



reply via email to

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