diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 1e5716e3..aec6aa86 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2182,7 +2182,7 @@ thread_main_handle_connection (void *data) | |||
2182 | MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN : | 2182 | MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN : |
2183 | MHD_REQUEST_TERMINATED_WITH_ERROR); | 2183 | MHD_REQUEST_TERMINATED_WITH_ERROR); |
2184 | MHD_connection_handle_idle (con); | 2184 | MHD_connection_handle_idle (con); |
2185 | exit: | 2185 | exit: |
2186 | if (NULL != con->response) | 2186 | if (NULL != con->response) |
2187 | { | 2187 | { |
2188 | MHD_destroy_response (con->response); | 2188 | MHD_destroy_response (con->response); |
@@ -2742,7 +2742,7 @@ internal_add_connection (struct MHD_Daemon *daemon, | |||
2742 | #endif | 2742 | #endif |
2743 | } | 2743 | } |
2744 | return MHD_YES; | 2744 | return MHD_YES; |
2745 | cleanup: | 2745 | cleanup: |
2746 | if (NULL != daemon->notify_connection) | 2746 | if (NULL != daemon->notify_connection) |
2747 | daemon->notify_connection (daemon->notify_connection_cls, | 2747 | daemon->notify_connection (daemon->notify_connection_cls, |
2748 | connection, | 2748 | connection, |
@@ -5062,6 +5062,11 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5062 | daemon->uri_log_callback_cls = va_arg (ap, | 5062 | daemon->uri_log_callback_cls = va_arg (ap, |
5063 | void *); | 5063 | void *); |
5064 | break; | 5064 | break; |
5065 | case MHD_OPTION_SERVER_INSANITY: | ||
5066 | daemon->insanity_level = (enum MHD_DisableSanityCheck) | ||
5067 | va_arg (ap, | ||
5068 | unsigned int); | ||
5069 | break; | ||
5065 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 5070 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
5066 | case MHD_OPTION_THREAD_POOL_SIZE: | 5071 | case MHD_OPTION_THREAD_POOL_SIZE: |
5067 | daemon->worker_pool_size = va_arg (ap, | 5072 | daemon->worker_pool_size = va_arg (ap, |
@@ -5404,6 +5409,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
5404 | case MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE: | 5409 | case MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE: |
5405 | case MHD_OPTION_LISTENING_ADDRESS_REUSE: | 5410 | case MHD_OPTION_LISTENING_ADDRESS_REUSE: |
5406 | case MHD_OPTION_LISTEN_BACKLOG_SIZE: | 5411 | case MHD_OPTION_LISTEN_BACKLOG_SIZE: |
5412 | case MHD_OPTION_SERVER_INSANITY: | ||
5407 | if (MHD_YES != parse_options (daemon, | 5413 | if (MHD_YES != parse_options (daemon, |
5408 | servaddr, | 5414 | servaddr, |
5409 | opt, | 5415 | opt, |
@@ -6547,7 +6553,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6547 | return daemon; | 6553 | return daemon; |
6548 | 6554 | ||
6549 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) | 6555 | #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) |
6550 | thread_failed: | 6556 | thread_failed: |
6551 | /* If no worker threads created, then shut down normally. Calling | 6557 | /* If no worker threads created, then shut down normally. Calling |
6552 | MHD_stop_daemon (as we do below) doesn't work here since it | 6558 | MHD_stop_daemon (as we do below) doesn't work here since it |
6553 | assumes a 0-sized thread pool means we had been in the default | 6559 | assumes a 0-sized thread pool means we had been in the default |
@@ -6571,7 +6577,7 @@ thread_failed: | |||
6571 | return NULL; | 6577 | return NULL; |
6572 | #endif | 6578 | #endif |
6573 | 6579 | ||
6574 | free_and_fail: | 6580 | free_and_fail: |
6575 | /* clean up basic memory state in 'daemon' and return NULL to | 6581 | /* clean up basic memory state in 'daemon' and return NULL to |
6576 | indicate failure */ | 6582 | indicate failure */ |
6577 | #ifdef EPOLL_SUPPORT | 6583 | #ifdef EPOLL_SUPPORT |