gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 06/06: add -lrt for glib


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 06/06: add -lrt for glib
Date: Tue, 21 Mar 2017 21:50:02 +0100

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

grothoff pushed a commit to branch master
in repository libmicrohttpd.

commit 0bc2fe6fe7442c4d15498e6867a1e58697e809c9
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Mar 21 14:23:23 2017 +0100

    add -lrt for glib
---
 src/microhttpd/connection.c | 11 +++++++----
 src/microhttpd/daemon.c     | 11 +++++++++++
 src/microhttpd/internal.h   |  6 ++++++
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 5271991f..695a605c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1415,10 +1415,11 @@ MHD_connection_update_event_loop_info (struct 
MHD_Connection *connection)
         case MHD_CONNECTION_CONTINUE_SENT:
           if (connection->read_buffer_offset == connection->read_buffer_size)
             {
-              if ((MHD_YES != try_grow_read_buffer (connection)) &&
-                  (0 != (connection->daemon->options &
-                         MHD_USE_INTERNAL_POLLING_THREAD)) &&
-                  (! connection->suspended))
+              if ( (MHD_YES != try_grow_read_buffer (connection)) &&
+                  (0 != (connection->daemon->options &
+                         MHD_USE_INTERNAL_POLLING_THREAD)) &&
+                  (! connection->suspended) &&
+                  (! connection->just_resumed) )
                 {
                   /* failed to grow the read buffer, and the
                      client which is supposed to handle the
@@ -1822,6 +1823,7 @@ call_connection_handler (struct MHD_Connection 
*connection)
     return;                     /* already queued a response */
   processed = 0;
   connection->client_aware = true;
+  connection->just_resumed = false;    
   if (MHD_NO ==
       connection->daemon->default_handler (connection->daemon-> 
default_handler_cls,
                                           connection,
@@ -1984,6 +1986,7 @@ process_request_body (struct MHD_Connection *connection)
         }
       used = processed;
       connection->client_aware = true;
+      connection->just_resumed = false;
       if (MHD_NO ==
           connection->daemon->default_handler 
(connection->daemon->default_handler_cls,
                                                connection,
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d1ec032a..e94ad64c 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2799,7 +2799,18 @@ MHD_resume_connection (struct MHD_Connection *connection)
     MHD_PANIC (_("Cannot resume connections without enabling 
MHD_ALLOW_SUSPEND_RESUME!\n"));
   MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
   connection->resuming = true;
+  connection->just_resumed = true;
   daemon->resuming = true;
+  if (connection->connection_timeout == daemon->connection_timeout)
+  {
+    /* move to the end... */
+    XDLL_remove (daemon->normal_timeout_head,
+                daemon->normal_timeout_tail,
+                connection);
+    XDLL_insert (daemon->normal_timeout_head,
+                daemon->normal_timeout_tail,
+                connection);
+  }
   MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
   if ( (MHD_ITC_IS_VALID_(daemon->itc)) &&
        (! MHD_itc_activate_ (daemon->itc, "r")) )
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 5350c013..3abd9731 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -947,6 +947,12 @@ struct MHD_Connection
    * Is the connection wanting to resume?
    */
   bool resuming;
+  
+  /**
+   * Did the connection just resume? (Means we are generous
+   * in dealing with a full read buffer...).
+   */
+  bool just_resumed;
 };
 
 

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



reply via email to

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