gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 129/154: swap _NODELAY and _NOPUSH


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 129/154: swap _NODELAY and _NOPUSH
Date: Mon, 19 Aug 2019 10:17:21 +0200

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

ng0 pushed a commit to branch master
in repository libmicrohttpd.

commit da7cb682a24915a4bc37faf2c76583996fe26aea
Author: ng0 <address@hidden>
AuthorDate: Thu Aug 1 18:07:05 2019 +0000

    swap _NODELAY and _NOPUSH
---
 src/microhttpd/mhd_send.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 93fabd4f..7ca2b506 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -71,17 +71,6 @@ pre_cork_setsockopt (struct MHD_Connection *connection,
                       (const void *) &on_val,
                       sizeof (on_val));
   }
-#elif TCP_NODELAY
-  {
-    const MHD_SCKT_OPT_BOOL_ off_val = 0;
-    const MHD_SCKT_OPT_BOOL_ on_val = 1;
-
-    ret = setsockopt (connection->socket_fd,
-                      IPPROTO_TCP,
-                      TCP_NODELAY,
-                      (const void *) want_cork ? &off_val : &on_val,
-                      sizeof (on_val));
-  }
 #elif TCP_NOPUSH
   if (want_cork)
   {
@@ -104,6 +93,17 @@ pre_cork_setsockopt (struct MHD_Connection *connection,
                       (const void *) &on_val,
                       sizeof (on_val));
   }
+#elif TCP_NODELAY
+  {
+    const MHD_SCKT_OPT_BOOL_ off_val = 0;
+    const MHD_SCKT_OPT_BOOL_ on_val = 1;
+
+    ret = setsockopt (connection->socket_fd,
+                      IPPROTO_TCP,
+                      TCP_NODELAY,
+                      (const void *) want_cork ? &off_val : &on_val,
+                      sizeof (on_val));
+  }
 #endif
   if (0 == ret)
     {
@@ -171,8 +171,6 @@ post_cork_setsockopt (struct MHD_Connection *connection,
                       &off_val,
                       sizeof (off_val));
   }
-#elif TCP_NODELAY
-  /* nothing to do */
 #elif TCP_NOPUSH
   if (! want_cork)
   {
@@ -184,6 +182,8 @@ post_cork_setsockopt (struct MHD_Connection *connection,
                       (const void *) &off_val,
                       sizeof (off_val));
   }
+#elif TCP_NODELAY
+  /* nothing to do */
 #endif
   if (0 == ret)
     {

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



reply via email to

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