gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: new_connection_prepare_(): remove


From: gnunet
Subject: [libmicrohttpd] branch master updated: new_connection_prepare_(): removed extra sys-call
Date: Fri, 11 Dec 2020 18:28:38 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new d4acdb28 new_connection_prepare_(): removed extra sys-call
d4acdb28 is described below

commit d4acdb285f54ef96aca423405f84933bf89e9f86
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Dec 11 20:28:06 2020 +0300

    new_connection_prepare_(): removed extra sys-call
---
 src/microhttpd/daemon.c | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index a650eefe..46cfad0e 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2460,34 +2460,17 @@ new_connection_prepare_ (struct MHD_Daemon *daemon,
     errno = eno;
     return MHD_NO;
   }
-#if defined(MHD_TCP_CORK_NOPUSH) || defined(MHD_USE_MSG_MORE)
+
   if (! external_add)
+  {
     connection->sk_corked = _MHD_OFF;
+    connection->sk_nodelay = _MHD_OFF;
+  }
   else
-    connection->sk_corked = _MHD_UNKNOWN;
-
-  /* We will use TCP_CORK or TCP_NOPUSH or MSG_MORE to control
-     transmission, disable Nagle's algorithm (always) */
-  if (0 != MHD_socket_set_nodelay_ (client_socket, true))
   {
-    if (EOPNOTSUPP != MHD_socket_get_error_ ())
-    {
-#ifdef HAVE_MESSAGES
-      MHD_DLOG (daemon,
-                _ ("Failed to disable TCP Nagle on socket: %s\n"),
-                MHD_socket_last_strerr_ ());
-#endif
-    }
+    connection->sk_corked = _MHD_UNKNOWN;
     connection->sk_nodelay = _MHD_UNKNOWN;
   }
-  else
-    connection->sk_nodelay = _MHD_ON;
-#else  /* !MHD_TCP_CORK_NOPUSH && !MHD_USE_MSG_MORE */
-  if (! external_add)
-    connection->sk_nodelay = _MHD_OFF;
-  else
-    connection->sk_nodelay = _MHD_UNKNOWN;
-#endif /* !MHD_TCP_CORK_NOPUSH && !MHD_USE_MSG_MORE */
 
   connection->connection_timeout = daemon->connection_timeout;
   if (NULL == (connection->addr = malloc (addrlen)))

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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