diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index dd19a095..1b89de10 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2732,6 +2732,7 @@ new_connection_process_ (struct MHD_Daemon *daemon, | |||
2732 | * must be called only within daemon thread. */ | 2732 | * must be called only within daemon thread. */ |
2733 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 2733 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ |
2734 | MHD_thread_ID_match_current_ (daemon->pid) ); | 2734 | MHD_thread_ID_match_current_ (daemon->pid) ); |
2735 | mhd_assert (NULL == daemon->worker_pool); | ||
2735 | #endif /* MHD_USE_THREADS */ | 2736 | #endif /* MHD_USE_THREADS */ |
2736 | 2737 | ||
2737 | /* Allocate memory pool in the processing thread so | 2738 | /* Allocate memory pool in the processing thread so |
@@ -3079,6 +3080,7 @@ void | |||
3079 | internal_suspend_connection_ (struct MHD_Connection *connection) | 3080 | internal_suspend_connection_ (struct MHD_Connection *connection) |
3080 | { | 3081 | { |
3081 | struct MHD_Daemon *daemon = connection->daemon; | 3082 | struct MHD_Daemon *daemon = connection->daemon; |
3083 | mhd_assert (NULL == daemon->worker_pool); | ||
3082 | 3084 | ||
3083 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 3085 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
3084 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 3086 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ |
@@ -3223,6 +3225,9 @@ _MHD_EXTERN void | |||
3223 | MHD_resume_connection (struct MHD_Connection *connection) | 3225 | MHD_resume_connection (struct MHD_Connection *connection) |
3224 | { | 3226 | { |
3225 | struct MHD_Daemon *daemon = connection->daemon; | 3227 | struct MHD_Daemon *daemon = connection->daemon; |
3228 | #if defined(MHD_USE_THREADS) | ||
3229 | mhd_assert (NULL == daemon->worker_pool); | ||
3230 | #endif /* MHD_USE_THREADS */ | ||
3226 | 3231 | ||
3227 | if (0 == (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) | 3232 | if (0 == (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) |
3228 | MHD_PANIC (_ ( | 3233 | MHD_PANIC (_ ( |
@@ -3599,6 +3604,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon) | |||
3599 | #ifdef MHD_USE_THREADS | 3604 | #ifdef MHD_USE_THREADS |
3600 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 3605 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ |
3601 | MHD_thread_ID_match_current_ (daemon->pid) ); | 3606 | MHD_thread_ID_match_current_ (daemon->pid) ); |
3607 | mhd_assert (NULL == daemon->worker_pool); | ||
3602 | #endif /* MHD_USE_THREADS */ | 3608 | #endif /* MHD_USE_THREADS */ |
3603 | 3609 | ||
3604 | addrlen = sizeof (addrstorage); | 3610 | addrlen = sizeof (addrstorage); |
@@ -3779,6 +3785,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) | |||
3779 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 3785 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
3780 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 3786 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ |
3781 | MHD_thread_ID_match_current_ (daemon->pid) ); | 3787 | MHD_thread_ID_match_current_ (daemon->pid) ); |
3788 | mhd_assert (NULL == daemon->worker_pool); | ||
3782 | 3789 | ||
3783 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); | 3790 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); |
3784 | #endif | 3791 | #endif |
@@ -5497,6 +5504,7 @@ close_connection (struct MHD_Connection *pos) | |||
5497 | #ifdef MHD_USE_THREADS | 5504 | #ifdef MHD_USE_THREADS |
5498 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 5505 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ |
5499 | MHD_thread_ID_match_current_ (daemon->pid) ); | 5506 | MHD_thread_ID_match_current_ (daemon->pid) ); |
5507 | mhd_assert (NULL == daemon->worker_pool); | ||
5500 | #endif /* MHD_USE_THREADS */ | 5508 | #endif /* MHD_USE_THREADS */ |
5501 | 5509 | ||
5502 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) | 5510 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) |