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. f8


From: gitolite
Subject: [GNUnet-SVN] [libmicrohttpd] GNU libmicrohttpd branch master updated. f8e3016ce00c974c27657b18d843ebf775415c62
Date: Fri, 4 Nov 2016 16:36:19 +0100 (CET)

The branch, master has been updated
       via  f8e3016ce00c974c27657b18d843ebf775415c62 (commit)
      from  43227e1b181165c6087e72ddcd22f85b690baaec (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 f8e3016ce00c974c27657b18d843ebf775415c62
Author: Christian Grothoff <address@hidden>
Date:   Fri Nov 4 16:36:17 2016 +0100

    document new invariants introduced by 
afe4f08eda64657f268e0d83e204041b2c281194

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

Summary of changes:
 src/microhttpd/daemon.c   |  9 ++++++---
 src/microhttpd/internal.h | 16 ++++++++++------
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 8405aa5..014e35e 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -5495,8 +5495,11 @@ close_all_connections (struct MHD_Daemon *daemon)
           if (NULL == susp->urh) /* "Upgraded" connection? */
             MHD_PANIC (_("MHD_stop_daemon() called while we have suspended 
connections.\n"));
 #ifdef HTTPS_SUPPORT
-          else if (used_tls && used_thr_p_c && MHD_NO == 
susp->urh->clean_ready)
-            shutdown (urh->app.socket, SHUT_RDWR); /* Wake thread by shutdown 
of app socket. */
+          else if (used_tls &&
+                   used_thr_p_c &&
+                   (MHD_NO == susp->urh->clean_ready) )
+            shutdown (urh->app.socket,
+                      SHUT_RDWR); /* Wake thread by shutdown of app socket. */
 #endif /* HTTPS_SUPPORT */
           else
             {
@@ -5508,7 +5511,7 @@ close_all_connections (struct MHD_Daemon *daemon)
               susp->urh->was_closed = MHD_YES;
               /* If thread-per-connection is used, connection's thread
                * may still processing "upgrade" (exiting). */
-              if (!used_thr_p_c)
+              if (! used_thr_p_c)
                 MHD_connection_finish_forward_ (susp);
               /* Do not use MHD_resume_connection() as mutex is
                * already locked. */
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 755515d..22187ae 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1015,34 +1015,38 @@ struct MHD_UpgradeResponseHandle
   /**
    * The buffer for receiving data from TLS to
    * be passed to the application.  Contains @e in_buffer_size
-   * bytes. Do not free!
+   * bytes (unless @e in_buffer_size is zero). Do not free!
    */
   char *in_buffer;
 
   /**
    * The buffer for receiving data from the application to
    * be passed to TLS.  Contains @e out_buffer_size
-   * bytes. Do not free!
+   * bytes (unless @e out_buffer_size is zero). Do not free!
    */
   char *out_buffer;
 
   /**
-   * Size of the @e in_buffer
+   * Size of the @e in_buffer. 0 if the connection went down for reading.
    */
   size_t in_buffer_size;
 
   /**
-   * Size of the @e out_buffer
+   * Size of the @e out_buffer. 0 if the connection went down for writing.
    */
   size_t out_buffer_size;
 
   /**
-   * Number of bytes actually in use in the @e in_buffer
+   * Number of bytes actually in use in the @e in_buffer.  Can be larger
+   * than @e in_buffer_size if and only if @a in_buffer_size is zero and
+   * we still have bytes to process in the buffer.
    */
   size_t in_buffer_used;
 
   /**
-   * Number of bytes actually in use in the @e out_buffer
+   * Number of bytes actually in use in the @e out_buffer. Can be larger
+   * than @e out_buffer_size if and only if @a out_buffer_size is zero and
+   * we still have bytes to process in the buffer.
    */
   size_t out_buffer_used;
 


hooks/post-receive
-- 
GNU libmicrohttpd



reply via email to

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