[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.
- [libmicrohttpd] branch master updated (cd4d2f65 -> a19df909), gnunet, 2023/11/23
- [libmicrohttpd] 03/13: MHD_start_daemon(): moved daemon flags internal initialisation,
gnunet <=
- [libmicrohttpd] 01/13: Added detection of more conditions to process the data without waiting, gnunet, 2023/11/23
- [libmicrohttpd] 04/13: MHD_start_daemon(): reject INTERNAL_POLLING_THREAD if threads are disabled, gnunet, 2023/11/23
- [libmicrohttpd] 02/13: MHD_quiesce_daemon(): fixed return value if already quiesced, gnunet, 2023/11/23
- [libmicrohttpd] 05/13: Moved user options counter to shorter its lifetime, gnunet, 2023/11/23
- [libmicrohttpd] 06/13: test_daemon: fixed to not skip if failed, gnunet, 2023/11/23
- [libmicrohttpd] 08/13: Improved daemon shutdown handling in external polling mode, gnunet, 2023/11/23
- [libmicrohttpd] 07/13: test_digestauth2: fixed order of the initial checks, gnunet, 2023/11/23
- [libmicrohttpd] 09/13: Micro-optimisations for non-overridable FD_SETSIZE, gnunet, 2023/11/23
- [libmicrohttpd] 13/13: Officially support zero for MHD_OPTION_THREAD_POOL_SIZE, gnunet, 2023/11/23
- [libmicrohttpd] 10/13: Unified and simplified fd_set filling, gnunet, 2023/11/23