diff options
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 3f11b4eb..304c8e64 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -1249,7 +1249,7 @@ MHD_connection_close_ (struct MHD_Connection *connection, | |||
1249 | 1249 | ||
1250 | mhd_assert (! connection->suspended); | 1250 | mhd_assert (! connection->suspended); |
1251 | #ifdef MHD_USE_THREADS | 1251 | #ifdef MHD_USE_THREADS |
1252 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 1252 | mhd_assert ( (! MHD_D_IS_USING_THREADS_ (daemon)) || \ |
1253 | MHD_thread_handle_ID_is_current_thread_ (connection->tid) ); | 1253 | MHD_thread_handle_ID_is_current_thread_ (connection->tid) ); |
1254 | #endif /* MHD_USE_THREADS */ | 1254 | #endif /* MHD_USE_THREADS */ |
1255 | if ( (NULL != daemon->notify_completed) && | 1255 | if ( (NULL != daemon->notify_completed) && |
@@ -1292,7 +1292,7 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection) | |||
1292 | struct MHD_UpgradeResponseHandle *urh = connection->urh; | 1292 | struct MHD_UpgradeResponseHandle *urh = connection->urh; |
1293 | 1293 | ||
1294 | #ifdef MHD_USE_THREADS | 1294 | #ifdef MHD_USE_THREADS |
1295 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 1295 | mhd_assert ( (! MHD_D_IS_USING_THREADS_ (daemon)) || \ |
1296 | (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) || \ | 1296 | (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) || \ |
1297 | MHD_thread_handle_ID_is_current_thread_ (daemon->tid) ); | 1297 | MHD_thread_handle_ID_is_current_thread_ (daemon->tid) ); |
1298 | #endif /* MHD_USE_THREADS */ | 1298 | #endif /* MHD_USE_THREADS */ |
@@ -3465,7 +3465,7 @@ handle_recv_no_space (struct MHD_Connection *c, | |||
3465 | { | 3465 | { |
3466 | /* The connection must not be in MHD_EVENT_LOOP_INFO_READ state | 3466 | /* The connection must not be in MHD_EVENT_LOOP_INFO_READ state |
3467 | when external polling is used and some data left unprocessed. */ | 3467 | when external polling is used and some data left unprocessed. */ |
3468 | mhd_assert (0 != (c->daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)); | 3468 | mhd_assert (MHD_D_IS_USING_THREADS_ (c->daemon)); |
3469 | /* failed to grow the read buffer, and the | 3469 | /* failed to grow the read buffer, and the |
3470 | client which is supposed to handle the | 3470 | client which is supposed to handle the |
3471 | received data in a *blocking* fashion | 3471 | received data in a *blocking* fashion |
@@ -3616,7 +3616,7 @@ check_and_grow_read_buffer_space (struct MHD_Connection *c) | |||
3616 | space in the read buffer must be available. */ | 3616 | space in the read buffer must be available. */ |
3617 | mhd_assert (0 == (MHD_EVENT_LOOP_INFO_PROCESS & c->event_loop_info)); | 3617 | mhd_assert (0 == (MHD_EVENT_LOOP_INFO_PROCESS & c->event_loop_info)); |
3618 | 3618 | ||
3619 | if ((0 == (c->daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) | 3619 | if ((! MHD_D_IS_USING_THREADS_ (c->daemon)) |
3620 | && (MHD_CONNECTION_BODY_RECEIVING == c->state) | 3620 | && (MHD_CONNECTION_BODY_RECEIVING == c->state) |
3621 | && has_unprocessed_upload_body_data_in_buffer (c)) | 3621 | && has_unprocessed_upload_body_data_in_buffer (c)) |
3622 | { | 3622 | { |
@@ -4629,7 +4629,7 @@ process_request_body (struct MHD_Connection *connection) | |||
4629 | /* client did not process any upload data, complain if | 4629 | /* client did not process any upload data, complain if |
4630 | the setup was incorrect, which may prevent us from | 4630 | the setup was incorrect, which may prevent us from |
4631 | handling the rest of the request */ | 4631 | handling the rest of the request */ |
4632 | if (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) | 4632 | if (MHD_D_IS_USING_THREADS_ (daemon)) |
4633 | MHD_DLOG (daemon, | 4633 | MHD_DLOG (daemon, |
4634 | _ ("WARNING: Access Handler Callback has not processed " \ | 4634 | _ ("WARNING: Access Handler Callback has not processed " \ |
4635 | "any upload data and connection is not suspended. " \ | 4635 | "any upload data and connection is not suspended. " \ |
@@ -6948,7 +6948,7 @@ cleanup_connection (struct MHD_Connection *connection) | |||
6948 | { | 6948 | { |
6949 | struct MHD_Daemon *daemon = connection->daemon; | 6949 | struct MHD_Daemon *daemon = connection->daemon; |
6950 | #ifdef MHD_USE_THREADS | 6950 | #ifdef MHD_USE_THREADS |
6951 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 6951 | mhd_assert ( (! MHD_D_IS_USING_THREADS_ (daemon)) || \ |
6952 | MHD_thread_handle_ID_is_current_thread_ (connection->tid) ); | 6952 | MHD_thread_handle_ID_is_current_thread_ (connection->tid) ); |
6953 | mhd_assert (NULL == daemon->worker_pool); | 6953 | mhd_assert (NULL == daemon->worker_pool); |
6954 | #endif /* MHD_USE_THREADS */ | 6954 | #endif /* MHD_USE_THREADS */ |
@@ -7155,7 +7155,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
7155 | struct MHD_Daemon *daemon = connection->daemon; | 7155 | struct MHD_Daemon *daemon = connection->daemon; |
7156 | enum MHD_Result ret; | 7156 | enum MHD_Result ret; |
7157 | #ifdef MHD_USE_THREADS | 7157 | #ifdef MHD_USE_THREADS |
7158 | mhd_assert ( (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || \ | 7158 | mhd_assert ( (! MHD_D_IS_USING_THREADS_ (daemon)) || \ |
7159 | MHD_thread_handle_ID_is_current_thread_ (connection->tid) ); | 7159 | MHD_thread_handle_ID_is_current_thread_ (connection->tid) ); |
7160 | #endif /* MHD_USE_THREADS */ | 7160 | #endif /* MHD_USE_THREADS */ |
7161 | /* 'daemon' is not used if epoll is not available and asserts are disabled */ | 7161 | /* 'daemon' is not used if epoll is not available and asserts are disabled */ |
@@ -7832,7 +7832,7 @@ MHD_queue_response (struct MHD_Connection *connection, | |||
7832 | 7832 | ||
7833 | daemon = connection->daemon; | 7833 | daemon = connection->daemon; |
7834 | if ((! connection->in_access_handler) && (! connection->suspended) && | 7834 | if ((! connection->in_access_handler) && (! connection->suspended) && |
7835 | (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD))) | 7835 | MHD_D_IS_USING_THREADS_ (daemon)) |
7836 | return MHD_NO; | 7836 | return MHD_NO; |
7837 | 7837 | ||
7838 | reply_icy = (0 != (status_code & MHD_ICY_FLAG)); | 7838 | reply_icy = (0 != (status_code & MHD_ICY_FLAG)); |
@@ -7840,7 +7840,7 @@ MHD_queue_response (struct MHD_Connection *connection, | |||
7840 | 7840 | ||
7841 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 7841 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
7842 | if ( (! connection->suspended) && | 7842 | if ( (! connection->suspended) && |
7843 | (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) && | 7843 | MHD_D_IS_USING_THREADS_ (daemon) && |
7844 | (! MHD_thread_handle_ID_is_current_thread_ (connection->tid)) ) | 7844 | (! MHD_thread_handle_ID_is_current_thread_ (connection->tid)) ) |
7845 | { | 7845 | { |
7846 | #ifdef HAVE_MESSAGES | 7846 | #ifdef HAVE_MESSAGES |