diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 6a2677fc..dd19a095 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -260,6 +260,7 @@ struct MHD_IPCount | |||
260 | static void | 260 | static void |
261 | MHD_ip_count_lock (struct MHD_Daemon *daemon) | 261 | MHD_ip_count_lock (struct MHD_Daemon *daemon) |
262 | { | 262 | { |
263 | mhd_assert (NULL == daemon->master); | ||
263 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 264 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
264 | MHD_mutex_lock_chk_ (&daemon->per_ip_connection_mutex); | 265 | MHD_mutex_lock_chk_ (&daemon->per_ip_connection_mutex); |
265 | #else | 266 | #else |
@@ -276,6 +277,7 @@ MHD_ip_count_lock (struct MHD_Daemon *daemon) | |||
276 | static void | 277 | static void |
277 | MHD_ip_count_unlock (struct MHD_Daemon *daemon) | 278 | MHD_ip_count_unlock (struct MHD_Daemon *daemon) |
278 | { | 279 | { |
280 | mhd_assert (NULL == daemon->master); | ||
279 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 281 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
280 | MHD_mutex_unlock_chk_ (&daemon->per_ip_connection_mutex); | 282 | MHD_mutex_unlock_chk_ (&daemon->per_ip_connection_mutex); |
281 | #else | 283 | #else |
@@ -7482,6 +7484,10 @@ MHD_start_daemon_va (unsigned int flags, | |||
7482 | goto thread_failed; | 7484 | goto thread_failed; |
7483 | } | 7485 | } |
7484 | /* Some members must be used only in master daemon */ | 7486 | /* Some members must be used only in master daemon */ |
7487 | #if defined(MHD_USE_THREADS) | ||
7488 | memset (&d->per_ip_connection_mutex, 1, | ||
7489 | sizeof(d->per_ip_connection_mutex)); | ||
7490 | #endif /* MHD_USE_THREADS */ | ||
7485 | #ifdef DAUTH_SUPPORT | 7491 | #ifdef DAUTH_SUPPORT |
7486 | d->nnc = NULL; | 7492 | d->nnc = NULL; |
7487 | d->nonce_nc_size = 0; | 7493 | d->nonce_nc_size = 0; |