[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 06/07: MHD_start_daemon(): removed initiali
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 06/07: MHD_start_daemon(): removed initialisation of ITC for master daemon in thread pool mode as global ITC is not monitored. Fixed gnutls priorities deinitialization if ITC failed |
Date: |
Sun, 26 Mar 2017 12:52:44 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 7b0d92902c92782844e84e40ab54d58a65531a65
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun Mar 26 13:20:19 2017 +0300
MHD_start_daemon(): removed initialisation of ITC for master daemon in
thread pool mode
as global ITC is not monitored.
Fixed gnutls priorities deinitialization if ITC failed
---
src/microhttpd/daemon.c | 57 +++++++++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 25 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 41f8e4ec..41b15584 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -5398,6 +5398,7 @@ MHD_start_daemon_va (unsigned int flags,
#endif
/* try to open listen socket */
#ifdef HTTPS_SUPPORT
+ daemon->priority_cache = NULL;
if (0 != (*pflags & MHD_USE_TLS))
{
gnutls_priority_init (&daemon->priority_cache,
@@ -5450,31 +5451,6 @@ MHD_start_daemon_va (unsigned int flags,
#endif
*pflags |= MHD_USE_ITC; /* yes, must use ITC to signal thread */
}
- if (0 != (*pflags & MHD_USE_ITC))
- {
- if (! MHD_itc_init_ (daemon->itc))
- {
-#ifdef HAVE_MESSAGES
- MHD_DLOG (daemon,
- _("Failed to create inter-thread communication channel: %s\n"),
- MHD_itc_last_strerror_ ());
-#endif
- free (daemon);
- return NULL;
- }
- if ( (0 == (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL))) &&
- (! MHD_SCKT_FD_FITS_FDSET_(MHD_itc_r_fd_ (daemon->itc),
- NULL)) )
- {
-#ifdef HAVE_MESSAGES
- MHD_DLOG (daemon,
- _("file descriptor for inter-thread communication channel
exceeds maximum value\n"));
-#endif
- MHD_itc_destroy_chk_ (daemon->itc);
- free (daemon);
- return NULL;
- }
- }
#ifdef DAUTH_SUPPORT
daemon->digest_auth_rand_size = 0;
daemon->digest_auth_random = NULL;
@@ -5500,6 +5476,37 @@ MHD_start_daemon_va (unsigned int flags,
free (daemon);
return NULL;
}
+ if ( (0 != (*pflags & MHD_USE_ITC)) &&
+ (0 == daemon->worker_pool_size) )
+ {
+ if (! MHD_itc_init_ (daemon->itc))
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ _("Failed to create inter-thread communication channel:
%s\n"),
+ MHD_itc_last_strerror_ ());
+#endif
+ if (NULL != daemon->priority_cache)
+ gnutls_priority_deinit (daemon->priority_cache);
+ free (daemon);
+ return NULL;
+ }
+ if ( (0 == (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL))) &&
+ (! MHD_SCKT_FD_FITS_FDSET_(MHD_itc_r_fd_ (daemon->itc),
+ NULL)) )
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ _("file descriptor for inter-thread communication channel
exceeds maximum value\n"));
+#endif
+ MHD_itc_destroy_chk_ (daemon->itc);
+ if (NULL != daemon->priority_cache)
+ gnutls_priority_deinit (daemon->priority_cache);
+ free (daemon);
+ return NULL;
+ }
+ }
+
#ifdef DAUTH_SUPPORT
if (daemon->nonce_nc_size > 0)
{
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [libmicrohttpd] branch master updated (11fc9224 -> 6f6a4e22), gnunet, 2017/03/26
- [GNUnet-SVN] [libmicrohttpd] 05/07: MHD_select(): Removed bogus extra check, gnunet, 2017/03/26
- [GNUnet-SVN] [libmicrohttpd] 02/07: Simplified checks for allowed suspend, fixed false positive for daemons with MHD_USE_ITC, gnunet, 2017/03/26
- [GNUnet-SVN] [libmicrohttpd] 04/07: Streamlined internal usage of MHD_USE_ITC flag., gnunet, 2017/03/26
- [GNUnet-SVN] [libmicrohttpd] 03/07: Simplification: move external loop specific code from internal_run_from_select() to MHD_run_from_select()., gnunet, 2017/03/26
- [GNUnet-SVN] [libmicrohttpd] 07/07: MHD_start_daemon(): obey MHD_USE_ITC in thread pool mode, gnunet, 2017/03/26
- [GNUnet-SVN] [libmicrohttpd] 06/07: MHD_start_daemon(): removed initialisation of ITC for master daemon in thread pool mode as global ITC is not monitored. Fixed gnutls priorities deinitialization if ITC failed,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 01/07: MHD_start_daemon_va(): unify 'flags' and 'daemon->options' usage, gnunet, 2017/03/26