diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-03-26 13:32:12 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-03-26 13:52:13 +0300 |
commit | 6f6a4e220b2a02b86364cfe093570ad4ddd06860 (patch) | |
tree | 3f093d15a0b92d6b72209b22716548aa7ddf0b18 | |
parent | 7b0d92902c92782844e84e40ab54d58a65531a65 (diff) | |
download | libmicrohttpd-6f6a4e220b2a02b86364cfe093570ad4ddd06860.tar.gz libmicrohttpd-6f6a4e220b2a02b86364cfe093570ad4ddd06860.zip |
MHD_start_daemon(): obey MHD_USE_ITC in thread pool mode
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 21 |
2 files changed, 15 insertions, 11 deletions
@@ -1,3 +1,8 @@ | |||
1 | Sun Mar 26 13:49:01 MSK 2017 | ||
2 | Internal refactoring for simplification and unification. | ||
3 | Minor optimizations and minor fixes. | ||
4 | MHD_USE_ITC used again in thread pool mode. -EG | ||
5 | |||
1 | Sat Mar 25 20:58:24 CET 2017 | 6 | Sat Mar 25 20:58:24 CET 2017 |
2 | Remove dead MHD_strx_to_sizet-functions and associated | 7 | Remove dead MHD_strx_to_sizet-functions and associated |
3 | test cases from code. -CG | 8 | test cases from code. -CG |
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 41b15584..bda9292f 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -5955,8 +5955,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
5955 | d->worker_pool_size = 0; | 5955 | d->worker_pool_size = 0; |
5956 | d->worker_pool = NULL; | 5956 | d->worker_pool = NULL; |
5957 | 5957 | ||
5958 | /* Always use individual control ITCs */ | 5958 | if (0 != (*pflags & MHD_USE_ITC)) |
5959 | if (1) | ||
5960 | { | 5959 | { |
5961 | if (! MHD_itc_init_ (d->itc)) | 5960 | if (! MHD_itc_init_ (d->itc)) |
5962 | { | 5961 | { |
@@ -5967,17 +5966,17 @@ MHD_start_daemon_va (unsigned int flags, | |||
5967 | #endif | 5966 | #endif |
5968 | goto thread_failed; | 5967 | goto thread_failed; |
5969 | } | 5968 | } |
5970 | } | 5969 | if ( (0 == (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL))) && |
5971 | if ( (0 == (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL))) && | 5970 | (! MHD_SCKT_FD_FITS_FDSET_(MHD_itc_r_fd_ (d->itc), |
5972 | (! MHD_SCKT_FD_FITS_FDSET_(MHD_itc_r_fd_ (d->itc), | 5971 | NULL)) ) |
5973 | NULL)) ) | 5972 | { |
5974 | { | ||
5975 | #ifdef HAVE_MESSAGES | 5973 | #ifdef HAVE_MESSAGES |
5976 | MHD_DLOG (daemon, | 5974 | MHD_DLOG (daemon, |
5977 | _("File descriptor for worker inter-thread communication channel exceeds maximum value\n")); | 5975 | _("File descriptor for worker inter-thread communication channel exceeds maximum value\n")); |
5978 | #endif | 5976 | #endif |
5979 | MHD_itc_destroy_chk_ (d->itc); | 5977 | MHD_itc_destroy_chk_ (d->itc); |
5980 | goto thread_failed; | 5978 | goto thread_failed; |
5979 | } | ||
5981 | } | 5980 | } |
5982 | 5981 | ||
5983 | /* Divide available connections evenly amongst the threads. | 5982 | /* Divide available connections evenly amongst the threads. |