gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (1d5c381b -> 16da2797


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (1d5c381b -> 16da2797)
Date: Thu, 11 May 2017 21:39:42 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from 1d5c381b Compiler warning minor fixes
     new 19972a8e More minor fixes
     new 534d5864 resume_suspended_connections(): really mark resumed 
connection as "ready" in epoll mode
     new 02f1f5e5 resume_suspended_connections(): minor optimization
     new 16da2797 resume_suspended_connections(): update states of connection 
after resuming

The 4 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:
 ChangeLog                 |  3 +++
 src/microhttpd/daemon.c   | 13 +++++++++----
 src/microhttpd/internal.h |  2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e87285a..b9698655 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+Thu May 11 22:37:00 MSK 2017
+       Faster start really processing data in resumed connections. -EG
+
 Thu May 11 14:24:00 MSK 2017
        Do not add any "Connection" headers for "upgrade" connections. -EG
 
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 4bc61d76..de36296f 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -923,7 +923,7 @@ urh_from_pollfd(struct MHD_UpgradeResponseHandle *urh,
  *         fit fd_set.
  * @ingroup event
  */
-int
+static int
 internal_get_fdset2 (struct MHD_Daemon *daemon,
                      fd_set *read_fd_set,
                      fd_set *write_fd_set,
@@ -2833,6 +2833,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
   struct MHD_Connection *pos;
   struct MHD_Connection *prev = NULL;
   int ret;
+  const bool used_thr_p_c = (0 != (daemon->options & 
MHD_USE_THREAD_PER_CONNECTION));
 
   ret = MHD_NO;
   MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
@@ -2870,7 +2871,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
           DLL_insert (daemon->connections_head,
                       daemon->connections_tail,
                       pos);
-          if (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
+          if (!used_thr_p_c)
             {
               /* Reset timeout timer on resume. */
               if (0 != pos->connection_timeout)
@@ -2895,10 +2896,14 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
               EDLL_insert (daemon->eready_head,
                            daemon->eready_tail,
                            pos);
-              pos->epoll_state |= MHD_EPOLL_STATE_IN_EREADY_EDLL;
+              pos->epoll_state |= MHD_EPOLL_STATE_IN_EREADY_EDLL | \
+                  MHD_EPOLL_STATE_READ_READY | MHD_EPOLL_STATE_WRITE_READY;
               pos->epoll_state &= ~MHD_EPOLL_STATE_SUSPENDED;
             }
 #endif
+          /* Process response queued during suspend and update states. */
+          if (!used_thr_p_c)
+            MHD_connection_handle_idle (pos);
         }
 #ifdef UPGRADE_SUPPORT
       else
@@ -2915,7 +2920,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
       pos->resuming = false;
     }
   MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
-  if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
+  if ( (used_thr_p_c) &&
        (MHD_NO != ret) )
     { /* Wake up suspended connections. */
       if (! MHD_itc_activate_(daemon->itc,
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index a77e0a04..ac8f7330 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1872,7 +1872,7 @@ typedef int
  *
  * @param kind header kind to pass to @a cb
  * @param connection connection to add headers to
- * @param[in|out] args argument URI string (after "?" in URI),
+ * @param[in,out] args argument URI string (after "?" in URI),
  *        clobbered in the process!
  * @param cb function to call on each key-value pair found
  * @param[out] num_headers set to the number of headers found

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



reply via email to

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