gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 03/13: MHD_start_daemon(): moved daemon flags internal i


From: gnunet
Subject: [libmicrohttpd] 03/13: MHD_start_daemon(): moved daemon flags internal initialisation
Date: Thu, 23 Nov 2023 11:49:06 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 5cbdf771760d1e50147ee54b44b200218fa20ebe
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Nov 17 13:49:32 2023 +0300

    MHD_start_daemon(): moved daemon flags internal initialisation
---
 src/microhttpd/daemon.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index b7e9a5d1..a696b260 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -7594,6 +7594,10 @@ MHD_start_daemon_va (unsigned int flags,
   MHD_check_global_init_ ();
   eflags = (enum MHD_FLAG) flags;
   pflags = &eflags;
+
+  if (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION))
+    *pflags |= MHD_USE_INTERNAL_POLLING_THREAD; /* Force enable, log warning 
later if needed */
+
 #ifndef HAVE_INET6
   if (0 != (*pflags & MHD_USE_IPv6))
     return NULL;
@@ -7657,6 +7661,16 @@ MHD_start_daemon_va (unsigned int flags,
 #endif
   }
 
+  if (0 == (*pflags & MHD_USE_INTERNAL_POLLING_THREAD))
+    *pflags = (*pflags & ~((enum MHD_FLAG) MHD_USE_ITC)); /* useless if we are 
using 'external' select */
+  else
+  {
+#ifdef HAVE_LISTEN_SHUTDOWN
+    if (0 != (*pflags & MHD_USE_NO_LISTEN_SOCKET))
+#endif
+    *pflags |= MHD_USE_ITC;       /* yes, must use ITC to signal thread */
+  }
+
   if (NULL == (daemon = MHD_calloc_ (1, sizeof (struct MHD_Daemon))))
     return NULL;
   interim_params = (struct MHD_InterimParams_ *) \
@@ -7723,21 +7737,6 @@ MHD_start_daemon_va (unsigned int flags,
   daemon->fdset_size_set_by_app = false;
 #endif /* HAS_FD_SETSIZE_OVERRIDABLE */
 
-  if ( (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION)) &&
-       (0 == (*pflags & MHD_USE_INTERNAL_POLLING_THREAD)) )
-  {
-    /* Log warning message later, when log parameters are processes */
-    *pflags |= MHD_USE_INTERNAL_POLLING_THREAD;
-  }
-  if (0 == (*pflags & MHD_USE_INTERNAL_POLLING_THREAD))
-    *pflags = (*pflags & ~((enum MHD_FLAG) MHD_USE_ITC)); /* useless if we are 
using 'external' select */
-  else
-  {
-#ifdef HAVE_LISTEN_SHUTDOWN
-    if (0 != (*pflags & MHD_USE_NO_LISTEN_SOCKET))
-#endif
-    *pflags |= MHD_USE_ITC;       /* yes, must use ITC to signal thread */
-  }
 #ifdef DAUTH_SUPPORT
   daemon->digest_auth_rand_size = 0;
   daemon->digest_auth_random = NULL;

-- 
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]