gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (82e6ba21 -> 3e2ba2b1


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (82e6ba21 -> 3e2ba2b1)
Date: Thu, 24 Oct 2019 17:56:39 +0200

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

grothoff pushed a change to branch master
in repository libmicrohttpd.

    from 82e6ba21 add minimal example for empty body
     new 13d3805d use bit-test as we do in MHD_get_connection_values()
     new 3e2ba2b1 use booleans more nicely

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 | 4 ++--
 src/microhttpd/daemon.c     | 8 ++++----
 src/microhttpd/internal.h   | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 11c7099a..1dbbbd82 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -350,12 +350,12 @@ MHD_get_connection_values_n (struct MHD_Connection 
*connection,
   if (NULL == iterator)
     for (pos = connection->headers_received; NULL != pos; pos = pos->next)
     {
-      if (kind == pos->kind)
+      if (0 != (kind & pos->kind))
         ret++;
     }
   else
     for (pos = connection->headers_received; NULL != pos; pos = pos->next)
-      if (kind == pos->kind)
+      if (0 != (kind & pos->kind))
       {
         ret++;
         if (MHD_NO == iterator (iterator_cls,
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index e5d40861..1e5716e3 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3124,10 +3124,10 @@ MHD_add_connection (struct MHD_Daemon *daemon,
               _ ("Failed to set nonblocking mode on new client socket: %s\n"),
               MHD_socket_last_strerr_ ());
 #endif
-    sk_nonbl = 0;
+    sk_nonbl = false;
   }
   else
-    sk_nonbl = ! 0;
+    sk_nonbl = true;
 
   if ( (0 != (daemon->options & MHD_USE_TURBO)) &&
        (! MHD_socket_noninheritable_ (client_socket)) )
@@ -3200,7 +3200,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
   s = accept (fd,
               addr,
               &addrlen);
-  sk_nonbl = 0;
+  sk_nonbl = false;
 #endif /* ! USE_ACCEPT4 */
   if ( (MHD_INVALID_SOCKET == s) ||
        (addrlen <= 0) )
@@ -3281,7 +3281,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
 #endif
   }
   else
-    sk_nonbl = ! 0;
+    sk_nonbl = true;
 #endif /* !USE_ACCEPT4 || !HAVE_SOCK_NONBLOCK */
 #if ! defined(USE_ACCEPT4) || ! defined(SOCK_CLOEXEC)
   if (! MHD_socket_noninheritable_ (s))
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 5cf35790..fa66d265 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -874,7 +874,7 @@ struct MHD_Connection
   /**
    * true if #socket_fd is non-blocking, false otherwise.
    */
-  bool sk_nonblck; // FIXME: hopefully dead?
+  bool sk_nonblck;
 
   /**
    * Indicate whether connection socket has TCP_CORK / Nagle’s algorithm 
turned on/off

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



reply via email to

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