gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (d41652a6 -> 2a815fe3


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (d41652a6 -> 2a815fe3)
Date: Wed, 15 Feb 2017 11:47:43 +0100

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

grothoff pushed a change to branch master
in repository libmicrohttpd.

    from d41652a6 convert read_closed to 'bool' type
     new 78b14cd3 remove dead flag
     new 2a815fe3 convert have_chunked_upload to 'bool' type

The 2 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:
 src/microhttpd/connection.c | 20 ++++++++++----------
 src/microhttpd/internal.h   | 11 +----------
 2 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index cfa4a806..e91b2d87 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1091,7 +1091,7 @@ build_header_response (struct MHD_Connection *connection)
         client_requested_close = NULL;
 
       /* now analyze chunked encoding situation */
-      connection->have_chunked_upload = MHD_NO;
+      connection->have_chunked_upload = false;
 
       if ( (MHD_SIZE_UNKNOWN == connection->response->total_size) &&
            (NULL == response_has_close) &&
@@ -1111,7 +1111,7 @@ build_header_response (struct MHD_Connection *connection)
               if (NULL == have_encoding)
                 {
                   must_add_chunked_encoding = MHD_YES;
-                  connection->have_chunked_upload = MHD_YES;
+                  connection->have_chunked_upload = true;
                 }
               else if (MHD_str_equal_caseless_ (have_encoding,
                                                 "identity"))
@@ -1121,7 +1121,7 @@ build_header_response (struct MHD_Connection *connection)
                 }
               else
                 {
-                  connection->have_chunked_upload = MHD_YES;
+                  connection->have_chunked_upload = true;
                 }
             }
           else
@@ -1858,7 +1858,7 @@ process_request_body (struct MHD_Connection *connection)
   do
     {
       instant_retry = MHD_NO;
-      if ( (MHD_YES == connection->have_chunked_upload) &&
+      if ( (connection->have_chunked_upload) &&
            (MHD_SIZE_UNKNOWN == connection->remaining_upload_size) )
         {
           if ( (connection->current_chunk_offset == 
connection->current_chunk_size) &&
@@ -2015,7 +2015,7 @@ process_request_body (struct MHD_Connection *connection)
 #endif
        }
       used -= processed;
-      if (MHD_YES == connection->have_chunked_upload)
+      if (connection->have_chunked_upload)
         connection->current_chunk_offset += used;
       /* dh left "processed" bytes in buffer for next time... */
       buffer_head += used;
@@ -2335,7 +2335,7 @@ parse_connection_headers (struct MHD_Connection 
*connection)
       connection->remaining_upload_size = MHD_SIZE_UNKNOWN;
       if (MHD_str_equal_caseless_(enc,
                                   "chunked"))
-        connection->have_chunked_upload = MHD_YES;
+        connection->have_chunked_upload = true;
     }
   else
     {
@@ -2904,8 +2904,8 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
                  (0 == connection->read_buffer_offset) &&
                  (connection->read_closed) ) )
             {
-              if ((MHD_YES == connection->have_chunked_upload) &&
-                  (! connection->read_closed))
+              if ( (connection->have_chunked_upload) &&
+                   (! connection->read_closed) )
                 connection->state = MHD_CONNECTION_BODY_RECEIVED;
               else
                 connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
@@ -3098,7 +3098,7 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
                                      _("Closing connection (failed to create 
response header)\n"));
               continue;
             }
-          if ( (MHD_NO == connection->have_chunked_upload) ||
+          if ( (! connection->have_chunked_upload) ||
                (connection->write_buffer_send_offset ==
                 connection->write_buffer_append_offset) )
             connection->state = MHD_CONNECTION_FOOTERS_SENT;
@@ -3190,7 +3190,7 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
           connection->headers_received = NULL;
          connection->headers_received_tail = NULL;
           connection->response_write_position = 0;
-          connection->have_chunked_upload = MHD_NO;
+          connection->have_chunked_upload = false;
           connection->method = NULL;
           connection->url = NULL;
           connection->write_buffer = NULL;
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index a72a2c06..5d61705a 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -851,22 +851,13 @@ struct MHD_Connection
   unsigned int responseCode;
 
   /**
-   * Set to #MHD_YES if the response's content reader
-   * callback failed to provide data the last time
-   * we tried to read from it.  In that case, the
-   * write socket should be marked as unready until
-   * the CRC call succeeds.
-   */
-  int response_unready;
-
-  /**
    * Are we receiving with chunked encoding?  This will be set to
    * #MHD_YES after we parse the headers and are processing the body
    * with chunks.  After we are done with the body and we are
    * processing the footers; once the footers are also done, this will
    * be set to #MHD_NO again (before the final call to the handler).
    */
-  int have_chunked_upload;
+  bool have_chunked_upload;
 
   /**
    * If we are receiving with chunked encoding, where are we right

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



reply via email to

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