gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 03/03: epoll: make sure that connection waiting for data


From: gnunet
Subject: [libmicrohttpd] 03/03: epoll: make sure that connection waiting for data processing will be processed
Date: Fri, 28 Oct 2022 13:22:59 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 8565e7a8a9e38ae2a2027624cc12c73ef9628f09
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Oct 21 20:22:19 2022 +0300

    epoll: make sure that connection waiting for data processing will be 
processed
---
 src/microhttpd/connection.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 9c6403fd..6b1ad54e 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -5301,10 +5301,20 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
 enum MHD_Result
 MHD_connection_epoll_update_ (struct MHD_Connection *connection)
 {
-  struct MHD_Daemon *daemon = connection->daemon;
+  struct MHD_Daemon *const daemon = connection->daemon;
 
-  if ( (0 != (daemon->options & MHD_USE_EPOLL)) &&
-       (0 == (connection->epoll_state & MHD_EPOLL_STATE_IN_EPOLL_SET)) &&
+  mhd_assert (0 != (daemon->options & MHD_USE_EPOLL));
+
+  if ((0 != (MHD_EVENT_LOOP_INFO_PROCESS & connection->event_loop_info)) &&
+      (0 == (connection->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL)))
+  {
+    /* Make sure that connection waiting for processing will be processed */
+    EDLL_insert (daemon->eready_head,
+                 daemon->eready_tail,
+                 connection);
+  }
+
+  if ( (0 == (connection->epoll_state & MHD_EPOLL_STATE_IN_EPOLL_SET)) &&
        (0 == (connection->epoll_state & MHD_EPOLL_STATE_SUSPENDED)) &&
        ( ( (MHD_EVENT_LOOP_INFO_WRITE == connection->event_loop_info) &&
            (0 == (connection->epoll_state & MHD_EPOLL_STATE_WRITE_READY))) ||

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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