gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 07/08: convert client_aware to 'bool'


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 07/08: convert client_aware to 'bool'
Date: Wed, 15 Feb 2017 13:37:21 +0100

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

grothoff pushed a commit to branch master
in repository libmicrohttpd.

commit d6dd85a3e6653af61401cedb76d1a24b632fec03
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Feb 15 13:34:13 2017 +0100

    convert client_aware to 'bool'
---
 src/microhttpd/connection.c | 16 ++++++++--------
 src/microhttpd/daemon.c     |  4 ++--
 src/microhttpd/internal.h   |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index e91b2d87..3b78f45c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -551,12 +551,12 @@ MHD_connection_close_ (struct MHD_Connection *connection,
       MHD_destroy_response (resp);
     }
   if ( (NULL != daemon->notify_completed) &&
-       (MHD_YES == connection->client_aware) )
+       (connection->client_aware) )
     daemon->notify_completed (daemon->notify_completed_cls,
                              connection,
                              &connection->client_context,
                              termination_code);
-  connection->client_aware = MHD_NO;
+  connection->client_aware = false;
 }
 
 
@@ -1771,11 +1771,11 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
     }
   if (NULL != daemon->uri_log_callback)
     {
+      connection->client_aware = true;
       connection->client_context
         = daemon->uri_log_callback (daemon->uri_log_callback_cls,
                                    curi,
                                     connection);
-      connection->client_aware = MHD_YES;
     }
   if (NULL != args)
     {
@@ -1812,7 +1812,7 @@ call_connection_handler (struct MHD_Connection 
*connection)
   if (NULL != connection->response)
     return;                     /* already queued a response */
   processed = 0;
-  connection->client_aware = MHD_YES;
+  connection->client_aware = true;
   if (MHD_NO ==
       connection->daemon->default_handler (connection->daemon-> 
default_handler_cls,
                                           connection,
@@ -1974,7 +1974,7 @@ process_request_body (struct MHD_Connection *connection)
            }
         }
       used = processed;
-      connection->client_aware = MHD_YES;
+      connection->client_aware = true;
       if (MHD_NO ==
           connection->daemon->default_handler 
(connection->daemon->default_handler_cls,
                                                connection,
@@ -3132,13 +3132,13 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
           MHD_destroy_response (connection->response);
           connection->response = NULL;
           if ( (NULL != daemon->notify_completed) &&
-               (MHD_YES == connection->client_aware) )
+               (connection->client_aware) )
           {
+            connection->client_aware = false;
            daemon->notify_completed (daemon->notify_completed_cls,
                                      connection,
                                      &connection->client_context,
                                      MHD_REQUEST_TERMINATED_COMPLETED_OK);
-            connection->client_aware = MHD_NO;
           }
           end =
             MHD_lookup_connection_value (connection,
@@ -3183,7 +3183,7 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
               connection->read_buffer_size
                 = connection->daemon->pool_size / 2;
             }
-         connection->client_aware = MHD_NO;
+         connection->client_aware = false;
           connection->client_context = NULL;
           connection->continue_message_write_offset = 0;
           connection->responseCode = 0;
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d7692394..0b3462ae 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1742,12 +1742,12 @@ thread_main_handle_connection (void *data)
           /* Normal HTTP processing is finished,
            * notify application. */
           if ( (NULL != daemon->notify_completed) &&
-               (MHD_YES == con->client_aware) )
+               (con->client_aware) )
             daemon->notify_completed (daemon->notify_completed_cls,
                                       con,
                                       &con->client_context,
                                       MHD_REQUEST_TERMINATED_COMPLETED_OK);
-          con->client_aware = MHD_NO;
+          con->client_aware = false;
 
           thread_main_connection_upgrade (con);
           /* MHD_connection_finish_forward_() was called by 
thread_main_connection_upgrade(). */
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index f2e61d51..95163461 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -788,7 +788,7 @@ struct MHD_Connection
    * flag will determine if we call the #MHD_OPTION_NOTIFY_COMPLETED
    * handler when the connection closes down).
    */
-  int client_aware;
+  bool client_aware;
 
   /**
    * Socket for this connection.  Set to #MHD_INVALID_SOCKET if

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



reply via email to

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