gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 03/06: MHD_connection_handle_read(): change


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 03/06: MHD_connection_handle_read(): changed return type to void as return value is not used Functionality is unchanged.
Date: Mon, 05 Jun 2017 22:49:06 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 460745c1ebb242e5f38bcafa1d598628c7b859c0
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon Jun 5 23:06:00 2017 +0300

    MHD_connection_handle_read(): changed return type to void as return value 
is not used
    Functionality is unchanged.
---
 src/microhttpd/connection.c | 22 ++++++++++------------
 src/microhttpd/connection.h |  4 +---
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 1833b060..19e6f24c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2656,24 +2656,22 @@ MHD_update_last_activity_ (struct MHD_Connection 
*connection)
  * determined that there is data to be read off a socket.
  *
  * @param connection connection to handle
- * @return always #MHD_YES (we should continue to process the
- *         connection)
  */
-int
+void
 MHD_connection_handle_read (struct MHD_Connection *connection)
 {
   ssize_t bytes_read;
 
   if ( (MHD_CONNECTION_CLOSED == connection->state) ||
        (connection->suspended) )
-    return MHD_YES;
+    return;
 #ifdef HTTPS_SUPPORT
   if (MHD_TLS_CONN_NO_TLS != connection->tls_state)
     { /* HTTPS connection. */
       if (MHD_TLS_CONN_CONNECTED > connection->tls_state)
         {
           if (!MHD_run_tls_handshake_ (connection))
-            return MHD_YES;
+            return;
         }
     }
 #endif /* HTTPS_SUPPORT */
@@ -2685,7 +2683,7 @@ MHD_connection_handle_read (struct MHD_Connection 
*connection)
     try_grow_read_buffer (connection);
 
   if (connection->read_buffer_size == connection->read_buffer_offset)
-    return MHD_YES; /* No space for receiving data. */
+    return; /* No space for receiving data. */
   bytes_read = connection->recv_cls (connection,
                                      &connection->read_buffer
                                      [connection->read_buffer_offset],
@@ -2694,20 +2692,20 @@ MHD_connection_handle_read (struct MHD_Connection 
*connection)
   if (bytes_read < 0)
     {
       if (MHD_ERR_AGAIN_ == bytes_read)
-          return MHD_YES; /* No new data to process. */
+          return; /* No new data to process. */
       if (MHD_ERR_CONNRESET_ == bytes_read)
         {
            CONNECTION_CLOSE_ERROR (connection,
                                    (MHD_CONNECTION_INIT == connection->state) ?
                                      NULL :
                                      _("Socket is unexpectedly disconnected 
when reading request.\n"));
-           return MHD_NO;
+           return;
         }
       CONNECTION_CLOSE_ERROR (connection,
                               (MHD_CONNECTION_INIT == connection->state) ?
                                 NULL :
                                 _("Connection socket is closed due to 
unexpected error when reading request.\n"));
-      return MHD_YES;
+      return;
     }
 
   if (0 == bytes_read)
@@ -2715,7 +2713,7 @@ MHD_connection_handle_read (struct MHD_Connection 
*connection)
       connection->read_closed = true;
       MHD_connection_close_ (connection,
                              MHD_REQUEST_TERMINATED_CLIENT_ABORT);
-      return MHD_YES;
+      return;
     }
   connection->read_buffer_offset += bytes_read;
   MHD_update_last_activity_ (connection);
@@ -2747,7 +2745,7 @@ MHD_connection_handle_read (struct MHD_Connection 
*connection)
             }
           break;
         case MHD_CONNECTION_CLOSED:
-          return MHD_YES;
+          return;
 #ifdef UPGRADE_SUPPORT
         case MHD_CONNECTION_UPGRADE:
           EXTRA_CHECK (0);
@@ -2763,7 +2761,7 @@ MHD_connection_handle_read (struct MHD_Connection 
*connection)
         }
       break;
     }
-  return MHD_YES;
+  return;
 }
 
 
diff --git a/src/microhttpd/connection.h b/src/microhttpd/connection.h
index 147d7343..5deb5317 100644
--- a/src/microhttpd/connection.h
+++ b/src/microhttpd/connection.h
@@ -77,10 +77,8 @@ MHD_set_http_callbacks_ (struct MHD_Connection *connection);
  * call this function to handle reads.
  *
  * @param connection connection to handle
- * @return always MHD_YES (we should continue to process the
- *         connection)
  */
-int
+void
 MHD_connection_handle_read (struct MHD_Connection *connection);
 
 

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



reply via email to

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