diff options
Diffstat (limited to 'src')
37 files changed, 77 insertions, 63 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 7b37d0f7..4a8c8142 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -516,9 +516,10 @@ struct MHD_PostProcessor; | |||
516 | /** | 516 | /** |
517 | * @brief Flags for the `struct MHD_Daemon`. | 517 | * @brief Flags for the `struct MHD_Daemon`. |
518 | * | 518 | * |
519 | * Note that if neither #MHD_USE_THREAD_PER_CONNECTION nor | 519 | * Note that MHD will run automatically in background thread(s) only |
520 | * #MHD_USE_INTERNAL_POLLING_THREAD is used, the client wants control over | 520 | * if #MHD_USE_INTERNAL_POLLING_THREAD is used. Otherwise caller (application) |
521 | * the process and will call the appropriate microhttpd callbacks. | 521 | * must use #MHD_run() or #MHD_run_from_select() to have MHD processed |
522 | * network connections and data. | ||
522 | * | 523 | * |
523 | * Starting the daemon may also fail if a particular option is not | 524 | * Starting the daemon may also fail if a particular option is not |
524 | * implemented or not supported on the target platform (i.e. no | 525 | * implemented or not supported on the target platform (i.e. no |
@@ -553,12 +554,18 @@ enum MHD_FLAG | |||
553 | 554 | ||
554 | /** | 555 | /** |
555 | * Run using one thread per connection. | 556 | * Run using one thread per connection. |
557 | * Must be used only with #MHD_USE_INTERNAL_POLLING_THREAD. | ||
556 | */ | 558 | */ |
557 | MHD_USE_THREAD_PER_CONNECTION = 4, | 559 | MHD_USE_THREAD_PER_CONNECTION = 4, |
558 | 560 | ||
559 | /** | 561 | /** |
560 | * Run using an internal thread (or thread pool) for sockets sending | 562 | * Run using an internal thread (or thread pool) for sockets sending |
561 | * and receiving and data processing. | 563 | * and receiving and data processing. Without this flag MHD will not |
564 | * run automatically in background thread(s). | ||
565 | * If this flag is set, #MHD_run() and #MHD_run_from_select() couldn't | ||
566 | * be used. | ||
567 | * This flag is set explicitly by #MHD_USE_POLL_INTERNAL_THREAD and | ||
568 | * by #MHD_USE_EPOLL_INTERNAL_THREAD. | ||
562 | */ | 569 | */ |
563 | MHD_USE_INTERNAL_POLLING_THREAD = 8, | 570 | MHD_USE_INTERNAL_POLLING_THREAD = 8, |
564 | 571 | ||
@@ -666,9 +673,8 @@ enum MHD_FLAG | |||
666 | 673 | ||
667 | /** | 674 | /** |
668 | * Use inter-thread communication channel. | 675 | * Use inter-thread communication channel. |
669 | * #MHD_USE_ITC can be used with internal select/poll/other | 676 | * #MHD_USE_ITC can be used with #MHD_USE_INTERNAL_POLLING_THREAD |
670 | * or #MHD_USE_THREAD_PER_CONNECTION and is ignored with any | 677 | * and is ignored with any "external" mode. |
671 | * "external" mode. | ||
672 | * It's required for use of #MHD_quiesce_daemon | 678 | * It's required for use of #MHD_quiesce_daemon |
673 | * or #MHD_add_connection. | 679 | * or #MHD_add_connection. |
674 | * This option is enforced by #MHD_ALLOW_SUSPEND_RESUME or | 680 | * This option is enforced by #MHD_ALLOW_SUSPEND_RESUME or |
@@ -1832,10 +1838,10 @@ MHD_get_timeout (struct MHD_Daemon *daemon, | |||
1832 | * This function is a convenience method, which is useful if the | 1838 | * This function is a convenience method, which is useful if the |
1833 | * fd_sets from #MHD_get_fdset were not directly passed to `select()`; | 1839 | * fd_sets from #MHD_get_fdset were not directly passed to `select()`; |
1834 | * with this function, MHD will internally do the appropriate `select()` | 1840 | * with this function, MHD will internally do the appropriate `select()` |
1835 | * call itself again. While it is always safe to call #MHD_run (in | 1841 | * call itself again. While it is always safe to call #MHD_run (if |
1836 | * external select mode), you should call #MHD_run_from_select if | 1842 | * ::MHD_USE_INTERNAL_POLLING_THREAD is not set), you should call |
1837 | * performance is important (as it saves an expensive call to | 1843 | * #MHD_run_from_select if performance is important (as it saves an |
1838 | * `select()`). | 1844 | * expensive call to `select()`). |
1839 | * | 1845 | * |
1840 | * @param daemon daemon to run | 1846 | * @param daemon daemon to run |
1841 | * @return #MHD_YES on success, #MHD_NO if this | 1847 | * @return #MHD_YES on success, #MHD_NO if this |
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 59973c86..206b1a69 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -3903,7 +3903,6 @@ int | |||
3903 | MHD_run (struct MHD_Daemon *daemon) | 3903 | MHD_run (struct MHD_Daemon *daemon) |
3904 | { | 3904 | { |
3905 | if ( (MHD_YES == daemon->shutdown) || | 3905 | if ( (MHD_YES == daemon->shutdown) || |
3906 | (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) || | ||
3907 | (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) ) | 3906 | (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) ) |
3908 | return MHD_NO; | 3907 | return MHD_NO; |
3909 | if (0 != (daemon->options & MHD_USE_POLL)) | 3908 | if (0 != (daemon->options & MHD_USE_POLL)) |
@@ -4089,7 +4088,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) | |||
4089 | if (MHD_INVALID_SOCKET == ret) | 4088 | if (MHD_INVALID_SOCKET == ret) |
4090 | return MHD_INVALID_SOCKET; | 4089 | return MHD_INVALID_SOCKET; |
4091 | if ( (MHD_ITC_IS_INVALID_(daemon->itc)) && | 4090 | if ( (MHD_ITC_IS_INVALID_(daemon->itc)) && |
4092 | (0 != (daemon->options & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION))) ) | 4091 | (0 != (daemon->options & (MHD_USE_INTERNAL_POLLING_THREAD))) ) |
4093 | { | 4092 | { |
4094 | #ifdef HAVE_MESSAGES | 4093 | #ifdef HAVE_MESSAGES |
4095 | MHD_DLOG (daemon, | 4094 | MHD_DLOG (daemon, |
@@ -4781,12 +4780,24 @@ MHD_start_daemon_va (unsigned int flags, | |||
4781 | daemon->custom_error_log = (MHD_LogCallback) &vfprintf; | 4780 | daemon->custom_error_log = (MHD_LogCallback) &vfprintf; |
4782 | daemon->custom_error_log_cls = stderr; | 4781 | daemon->custom_error_log_cls = stderr; |
4783 | #endif | 4782 | #endif |
4783 | if ( (0 != (flags & MHD_USE_THREAD_PER_CONNECTION)) && | ||
4784 | (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) ) | ||
4785 | { | ||
4786 | #ifdef HAVE_MESSAGES | ||
4787 | MHD_DLOG (daemon, | ||
4788 | _("Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with " | ||
4789 | "MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD " | ||
4790 | "was added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.\n")); | ||
4791 | #endif | ||
4792 | flags |= MHD_USE_INTERNAL_POLLING_THREAD; | ||
4793 | daemon->options |= MHD_USE_INTERNAL_POLLING_THREAD; | ||
4794 | } | ||
4784 | #ifdef HAVE_LISTEN_SHUTDOWN | 4795 | #ifdef HAVE_LISTEN_SHUTDOWN |
4785 | use_itc = (0 != (daemon->options & (MHD_USE_NO_LISTEN_SOCKET | MHD_USE_ITC))); | 4796 | use_itc = (0 != (daemon->options & (MHD_USE_NO_LISTEN_SOCKET | MHD_USE_ITC))); |
4786 | #else | 4797 | #else |
4787 | use_itc = 1; /* yes, must use ITC to signal thread */ | 4798 | use_itc = 1; /* yes, must use ITC to signal thread */ |
4788 | #endif | 4799 | #endif |
4789 | if (0 == (flags & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION))) | 4800 | if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) |
4790 | use_itc = 0; /* useless if we are using 'external' select */ | 4801 | use_itc = 0; /* useless if we are using 'external' select */ |
4791 | if (use_itc) | 4802 | if (use_itc) |
4792 | { | 4803 | { |
@@ -5233,9 +5244,8 @@ MHD_start_daemon_va (unsigned int flags, | |||
5233 | goto free_and_fail; | 5244 | goto free_and_fail; |
5234 | } | 5245 | } |
5235 | #endif /* HTTPS_SUPPORT */ | 5246 | #endif /* HTTPS_SUPPORT */ |
5236 | if ( ( (0 != (flags & MHD_USE_THREAD_PER_CONNECTION)) || | 5247 | if ( ( (0 != (flags & MHD_USE_INTERNAL_POLLING_THREAD)) && |
5237 | ( (0 != (flags & MHD_USE_INTERNAL_POLLING_THREAD)) && | 5248 | (0 == daemon->worker_pool_size) ) && |
5238 | (0 == daemon->worker_pool_size)) ) && | ||
5239 | (0 == (daemon->options & MHD_USE_NO_LISTEN_SOCKET)) && | 5249 | (0 == (daemon->options & MHD_USE_NO_LISTEN_SOCKET)) && |
5240 | (! MHD_create_named_thread_ (&daemon->pid, | 5250 | (! MHD_create_named_thread_ (&daemon->pid, |
5241 | (flags & MHD_USE_THREAD_PER_CONNECTION) ? | 5251 | (flags & MHD_USE_THREAD_PER_CONNECTION) ? |
@@ -5619,8 +5629,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) | |||
5619 | fd = daemon->socket_fd; | 5629 | fd = daemon->socket_fd; |
5620 | daemon->socket_fd = MHD_INVALID_SOCKET; | 5630 | daemon->socket_fd = MHD_INVALID_SOCKET; |
5621 | 5631 | ||
5622 | if ( (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || | 5632 | if (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) |
5623 | (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ) | ||
5624 | { | 5633 | { |
5625 | /* Separate thread(s) is used for select()/poll()/etc. */ | 5634 | /* Separate thread(s) is used for select()/poll()/etc. */ |
5626 | if (NULL != daemon->worker_pool) | 5635 | if (NULL != daemon->worker_pool) |
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c index b29ab72a..b28519dc 100644 --- a/src/microhttpd/test_upgrade.c +++ b/src/microhttpd/test_upgrade.c | |||
@@ -1064,8 +1064,7 @@ test_upgrade (int flags, | |||
1064 | &run_usock_client, | 1064 | &run_usock_client, |
1065 | &sock)) | 1065 | &sock)) |
1066 | abort (); | 1066 | abort (); |
1067 | if (0 == (flags & (MHD_USE_INTERNAL_POLLING_THREAD | | 1067 | if (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD) ) |
1068 | MHD_USE_THREAD_PER_CONNECTION)) ) | ||
1069 | run_mhd_loop (d, flags); | 1068 | run_mhd_loop (d, flags); |
1070 | pthread_join (pt_client, | 1069 | pthread_join (pt_client, |
1071 | NULL); | 1070 | NULL); |
@@ -1158,7 +1157,7 @@ main (int argc, | |||
1158 | #endif | 1157 | #endif |
1159 | 1158 | ||
1160 | /* Test thread-per-connection */ | 1159 | /* Test thread-per-connection */ |
1161 | res = test_upgrade (MHD_USE_THREAD_PER_CONNECTION, | 1160 | res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION, |
1162 | 0); | 1161 | 0); |
1163 | error_count += res; | 1162 | error_count += res; |
1164 | if (res) | 1163 | if (res) |
@@ -1166,7 +1165,7 @@ main (int argc, | |||
1166 | else if (verbose) | 1165 | else if (verbose) |
1167 | printf ("PASSED: Upgrade with thread per connection.\n"); | 1166 | printf ("PASSED: Upgrade with thread per connection.\n"); |
1168 | #ifdef HAVE_POLL | 1167 | #ifdef HAVE_POLL |
1169 | res = test_upgrade (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_POLL, | 1168 | res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_POLL, |
1170 | 0); | 1169 | 0); |
1171 | error_count += res; | 1170 | error_count += res; |
1172 | if (res) | 1171 | if (res) |
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c index ab0fa845..9882fc57 100644 --- a/src/testcurl/https/test_https_get.c +++ b/src/testcurl/https/test_https_get.c | |||
@@ -46,7 +46,7 @@ test_cipher_option (FILE * test_fd, | |||
46 | 46 | ||
47 | int ret; | 47 | int ret; |
48 | struct MHD_Daemon *d; | 48 | struct MHD_Daemon *d; |
49 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 49 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
50 | MHD_USE_DEBUG, 4233, | 50 | MHD_USE_DEBUG, 4233, |
51 | NULL, NULL, &http_ahc, NULL, | 51 | NULL, NULL, &http_ahc, NULL, |
52 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 52 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
@@ -75,7 +75,7 @@ test_secure_get (FILE * test_fd, | |||
75 | int ret; | 75 | int ret; |
76 | struct MHD_Daemon *d; | 76 | struct MHD_Daemon *d; |
77 | 77 | ||
78 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 78 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
79 | MHD_USE_DEBUG, 4233, | 79 | MHD_USE_DEBUG, 4233, |
80 | NULL, NULL, &http_ahc, NULL, | 80 | NULL, NULL, &http_ahc, NULL, |
81 | MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem, | 81 | MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem, |
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c index f5f6421b..d057e792 100644 --- a/src/testcurl/https/test_https_get_parallel_threads.c +++ b/src/testcurl/https/test_https_get_parallel_threads.c | |||
@@ -170,7 +170,7 @@ main (int argc, char *const *argv) | |||
170 | errorCount += | 170 | errorCount += |
171 | test_wrap ("multi threaded daemon, single client", &test_single_client, | 171 | test_wrap ("multi threaded daemon, single client", &test_single_client, |
172 | NULL, | 172 | NULL, |
173 | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION, | 173 | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD, |
174 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 174 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
175 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 175 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
176 | srv_self_signed_cert_pem, MHD_OPTION_END); | 176 | srv_self_signed_cert_pem, MHD_OPTION_END); |
@@ -178,7 +178,7 @@ main (int argc, char *const *argv) | |||
178 | errorCount += | 178 | errorCount += |
179 | test_wrap ("multi threaded daemon, parallel client", | 179 | test_wrap ("multi threaded daemon, parallel client", |
180 | &test_parallel_clients, NULL, | 180 | &test_parallel_clients, NULL, |
181 | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION, | 181 | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD, |
182 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, | 182 | aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, |
183 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, | 183 | srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, |
184 | srv_self_signed_cert_pem, MHD_OPTION_END); | 184 | srv_self_signed_cert_pem, MHD_OPTION_END); |
diff --git a/src/testcurl/https/test_https_multi_daemon.c b/src/testcurl/https/test_https_multi_daemon.c index 0ce49a06..672eac51 100644 --- a/src/testcurl/https/test_https_multi_daemon.c +++ b/src/testcurl/https/test_https_multi_daemon.c | |||
@@ -50,7 +50,7 @@ test_concurent_daemon_pair (void *cls, | |||
50 | struct MHD_Daemon *d1; | 50 | struct MHD_Daemon *d1; |
51 | struct MHD_Daemon *d2; | 51 | struct MHD_Daemon *d2; |
52 | 52 | ||
53 | d1 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 53 | d1 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
54 | MHD_USE_DEBUG, DEAMON_TEST_PORT, | 54 | MHD_USE_DEBUG, DEAMON_TEST_PORT, |
55 | NULL, NULL, &http_ahc, NULL, | 55 | NULL, NULL, &http_ahc, NULL, |
56 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 56 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
@@ -63,7 +63,7 @@ test_concurent_daemon_pair (void *cls, | |||
63 | return -1; | 63 | return -1; |
64 | } | 64 | } |
65 | 65 | ||
66 | d2 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 66 | d2 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
67 | MHD_USE_DEBUG, DEAMON_TEST_PORT + 1, | 67 | MHD_USE_DEBUG, DEAMON_TEST_PORT + 1, |
68 | NULL, NULL, &http_ahc, NULL, | 68 | NULL, NULL, &http_ahc, NULL, |
69 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 69 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index 11fa88d5..2c020dd7 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -107,7 +107,7 @@ test_query_session () | |||
107 | gen_test_file_url (url, DEAMON_TEST_PORT); | 107 | gen_test_file_url (url, DEAMON_TEST_PORT); |
108 | 108 | ||
109 | /* setup test */ | 109 | /* setup test */ |
110 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 110 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
111 | MHD_USE_DEBUG, DEAMON_TEST_PORT, | 111 | MHD_USE_DEBUG, DEAMON_TEST_PORT, |
112 | NULL, NULL, &query_session_ahc, NULL, | 112 | NULL, NULL, &query_session_ahc, NULL, |
113 | MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:+ARCFOUR-128", | 113 | MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:+ARCFOUR-128", |
diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c index db4eed4d..1da1ce3b 100644 --- a/src/testcurl/https/test_https_sni.c +++ b/src/testcurl/https/test_https_sni.c | |||
@@ -260,7 +260,7 @@ main (int argc, char *const *argv) | |||
260 | } | 260 | } |
261 | load_keys ("host1", ABS_SRCDIR "/host1.crt", ABS_SRCDIR "/host1.key"); | 261 | load_keys ("host1", ABS_SRCDIR "/host1.crt", ABS_SRCDIR "/host1.key"); |
262 | load_keys ("host2", ABS_SRCDIR "/host2.crt", ABS_SRCDIR "/host2.key"); | 262 | load_keys ("host2", ABS_SRCDIR "/host2.crt", ABS_SRCDIR "/host2.key"); |
263 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | MHD_USE_DEBUG, | 263 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG, |
264 | 4233, | 264 | 4233, |
265 | NULL, NULL, | 265 | NULL, NULL, |
266 | &http_ahc, NULL, | 266 | &http_ahc, NULL, |
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c index 7ef1da75..fccbd8ce 100644 --- a/src/testcurl/https/test_https_time_out.c +++ b/src/testcurl/https/test_https_time_out.c | |||
@@ -116,7 +116,7 @@ main (int argc, char *const *argv) | |||
116 | gnutls_global_init (); | 116 | gnutls_global_init (); |
117 | gnutls_global_set_log_level (11); | 117 | gnutls_global_set_log_level (11); |
118 | 118 | ||
119 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 119 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
120 | MHD_USE_DEBUG, DEAMON_TEST_PORT, | 120 | MHD_USE_DEBUG, DEAMON_TEST_PORT, |
121 | NULL, NULL, &http_dummy_ahc, NULL, | 121 | NULL, NULL, &http_dummy_ahc, NULL, |
122 | MHD_OPTION_CONNECTION_TIMEOUT, TIME_OUT, | 122 | MHD_OPTION_CONNECTION_TIMEOUT, TIME_OUT, |
diff --git a/src/testcurl/https/test_tls_authentication.c b/src/testcurl/https/test_tls_authentication.c index 5b27476f..4caa55ba 100644 --- a/src/testcurl/https/test_tls_authentication.c +++ b/src/testcurl/https/test_tls_authentication.c | |||
@@ -49,7 +49,7 @@ test_secure_get (void * cls, char *cipher_suite, int proto_version) | |||
49 | int ret; | 49 | int ret; |
50 | struct MHD_Daemon *d; | 50 | struct MHD_Daemon *d; |
51 | 51 | ||
52 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 52 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
53 | MHD_USE_DEBUG, DEAMON_TEST_PORT, | 53 | MHD_USE_DEBUG, DEAMON_TEST_PORT, |
54 | NULL, NULL, &http_ahc, NULL, | 54 | NULL, NULL, &http_ahc, NULL, |
55 | MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem, | 55 | MHD_OPTION_HTTPS_MEM_KEY, srv_signed_key_pem, |
diff --git a/src/testcurl/https/test_tls_extensions.c b/src/testcurl/https/test_tls_extensions.c index 2a51c7f9..365dd762 100644 --- a/src/testcurl/https/test_tls_extensions.c +++ b/src/testcurl/https/test_tls_extensions.c | |||
@@ -231,7 +231,7 @@ main (int argc, char *const *argv) | |||
231 | return -1; | 231 | return -1; |
232 | } | 232 | } |
233 | 233 | ||
234 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | | 234 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | |
235 | MHD_USE_DEBUG, DEAMON_TEST_PORT, | 235 | MHD_USE_DEBUG, DEAMON_TEST_PORT, |
236 | NULL, NULL, &http_ahc, NULL, | 236 | NULL, NULL, &http_ahc, NULL, |
237 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, | 237 | MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, |
diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c index afa1522d..bd843857 100644 --- a/src/testcurl/https/test_tls_options.c +++ b/src/testcurl/https/test_tls_options.c | |||
@@ -83,7 +83,7 @@ main (int argc, char *const *argv) | |||
83 | unsigned int errorCount = 0; | 83 | unsigned int errorCount = 0; |
84 | const char *ssl_version; | 84 | const char *ssl_version; |
85 | int daemon_flags = | 85 | int daemon_flags = |
86 | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TLS | MHD_USE_DEBUG; | 86 | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG; |
87 | 87 | ||
88 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); | 88 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); |
89 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 89 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index c374fe60..af9758bf 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -252,7 +252,7 @@ testMultithreadedGet (int port, int poll_flag) | |||
252 | 252 | ||
253 | cbc.buf = buf; | 253 | cbc.buf = buf; |
254 | cbc.size = 2048; | 254 | cbc.size = 2048; |
255 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 255 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, |
256 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 256 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
257 | if (d == NULL) | 257 | if (d == NULL) |
258 | return 16; | 258 | return 16; |
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c index e2579fa6..7bc59b5c 100644 --- a/src/testcurl/perf_get_concurrent.c +++ b/src/testcurl/perf_get_concurrent.c | |||
@@ -262,7 +262,7 @@ testMultithreadedGet (int port, int poll_flag) | |||
262 | const char * const test_desc = poll_flag ? "thread with poll" : "thread with select"; | 262 | const char * const test_desc = poll_flag ? "thread with poll" : "thread with select"; |
263 | const char * ret_val; | 263 | const char * ret_val; |
264 | 264 | ||
265 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 265 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, |
266 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 266 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
267 | if (d == NULL) | 267 | if (d == NULL) |
268 | return 16; | 268 | return 16; |
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c index 88aefddb..e3759ded 100644 --- a/src/testcurl/test_concurrent_stop.c +++ b/src/testcurl/test_concurrent_stop.c | |||
@@ -210,7 +210,7 @@ testMultithreadedGet (int port, | |||
210 | struct MHD_Daemon *d; | 210 | struct MHD_Daemon *d; |
211 | pthread_t p; | 211 | pthread_t p; |
212 | 212 | ||
213 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 213 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, |
214 | port, | 214 | port, |
215 | NULL, NULL, | 215 | NULL, NULL, |
216 | &ahc_echo, "GET", | 216 | &ahc_echo, "GET", |
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c index 431008cc..318bc643 100644 --- a/src/testcurl/test_delete.c +++ b/src/testcurl/test_delete.c | |||
@@ -189,7 +189,7 @@ testMultithreadedDelete () | |||
189 | cbc.buf = buf; | 189 | cbc.buf = buf; |
190 | cbc.size = 2048; | 190 | cbc.size = 2048; |
191 | cbc.pos = 0; | 191 | cbc.pos = 0; |
192 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 192 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
193 | 1081, | 193 | 1081, |
194 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 194 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
195 | if (d == NULL) | 195 | if (d == NULL) |
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c index b010aad7..52bf353e 100644 --- a/src/testcurl/test_get.c +++ b/src/testcurl/test_get.c | |||
@@ -170,7 +170,7 @@ testMultithreadedGet (int poll_flag) | |||
170 | cbc.buf = buf; | 170 | cbc.buf = buf; |
171 | cbc.size = 2048; | 171 | cbc.size = 2048; |
172 | cbc.pos = 0; | 172 | cbc.pos = 0; |
173 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 173 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, |
174 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 174 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
175 | if (d == NULL) | 175 | if (d == NULL) |
176 | return 16; | 176 | return 16; |
@@ -473,7 +473,7 @@ testStopRace (int poll_flag) | |||
473 | MHD_socket fd; | 473 | MHD_socket fd; |
474 | struct MHD_Daemon *d; | 474 | struct MHD_Daemon *d; |
475 | 475 | ||
476 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 476 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, |
477 | 1081, NULL, NULL, &ahc_echo, "GET", | 477 | 1081, NULL, NULL, &ahc_echo, "GET", |
478 | MHD_OPTION_CONNECTION_TIMEOUT, 5, MHD_OPTION_END); | 478 | MHD_OPTION_CONNECTION_TIMEOUT, 5, MHD_OPTION_END); |
479 | if (d == NULL) | 479 | if (d == NULL) |
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c index b98b2e04..896adf05 100644 --- a/src/testcurl/test_get_chunked.c +++ b/src/testcurl/test_get_chunked.c | |||
@@ -206,7 +206,7 @@ testMultithreadedGet () | |||
206 | cbc.buf = buf; | 206 | cbc.buf = buf; |
207 | cbc.size = 2048; | 207 | cbc.size = 2048; |
208 | cbc.pos = 0; | 208 | cbc.pos = 0; |
209 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 209 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
210 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 210 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
211 | if (d == NULL) | 211 | if (d == NULL) |
212 | return 16; | 212 | return 16; |
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c index 85454d43..5d846c4f 100644 --- a/src/testcurl/test_get_response_cleanup.c +++ b/src/testcurl/test_get_response_cleanup.c | |||
@@ -171,7 +171,7 @@ testMultithreadedGet () | |||
171 | struct MHD_Daemon *d; | 171 | struct MHD_Daemon *d; |
172 | pid_t curl; | 172 | pid_t curl; |
173 | 173 | ||
174 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 174 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
175 | 1081, NULL, NULL, &ahc_echo, "GET", | 175 | 1081, NULL, NULL, &ahc_echo, "GET", |
176 | MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 2, | 176 | MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 2, |
177 | MHD_OPTION_END); | 177 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c index 2b135013..70e819dd 100644 --- a/src/testcurl/test_get_sendfile.c +++ b/src/testcurl/test_get_sendfile.c | |||
@@ -175,7 +175,7 @@ testMultithreadedGet () | |||
175 | cbc.buf = buf; | 175 | cbc.buf = buf; |
176 | cbc.size = 2048; | 176 | cbc.size = 2048; |
177 | cbc.pos = 0; | 177 | cbc.pos = 0; |
178 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 178 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
179 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 179 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
180 | if (d == NULL) | 180 | if (d == NULL) |
181 | return 16; | 181 | return 16; |
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c index 65308a71..4ba102bb 100644 --- a/src/testcurl/test_large_put.c +++ b/src/testcurl/test_large_put.c | |||
@@ -210,7 +210,7 @@ testMultithreadedPut () | |||
210 | cbc.buf = buf; | 210 | cbc.buf = buf; |
211 | cbc.size = 2048; | 211 | cbc.size = 2048; |
212 | cbc.pos = 0; | 212 | cbc.pos = 0; |
213 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 213 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
214 | 1081, | 214 | 1081, |
215 | NULL, NULL, &ahc_echo, &done_flag, | 215 | NULL, NULL, &ahc_echo, &done_flag, |
216 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (1024*1024), | 216 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (1024*1024), |
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index e251b879..2bb19e3b 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -224,7 +224,7 @@ testMultithreadedPost () | |||
224 | cbc.buf = buf; | 224 | cbc.buf = buf; |
225 | cbc.size = 2048; | 225 | cbc.size = 2048; |
226 | cbc.pos = 0; | 226 | cbc.pos = 0; |
227 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 227 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
228 | 1081, NULL, NULL, &ahc_echo, NULL, | 228 | 1081, NULL, NULL, &ahc_echo, NULL, |
229 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 229 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
230 | MHD_OPTION_END); | 230 | MHD_OPTION_END); |
@@ -559,7 +559,7 @@ testMultithreadedPostCancelPart(int flags) | |||
559 | cbc.buf = buf; | 559 | cbc.buf = buf; |
560 | cbc.size = 2048; | 560 | cbc.size = 2048; |
561 | cbc.pos = 0; | 561 | cbc.pos = 0; |
562 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 562 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
563 | 1081, NULL, NULL, &ahc_cancel, NULL, | 563 | 1081, NULL, NULL, &ahc_cancel, NULL, |
564 | MHD_OPTION_END); | 564 | MHD_OPTION_END); |
565 | if (d == NULL) | 565 | if (d == NULL) |
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index 43775390..c4436a07 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -183,7 +183,7 @@ testMultithreadedPost () | |||
183 | 183 | ||
184 | cbc.buf = buf; | 184 | cbc.buf = buf; |
185 | cbc.size = 2048; | 185 | cbc.size = 2048; |
186 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 186 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
187 | 1081, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); | 187 | 1081, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); |
188 | if (d == NULL) | 188 | if (d == NULL) |
189 | return 16; | 189 | return 16; |
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c index 9c1381d1..1c655041 100644 --- a/src/testcurl/test_postform.c +++ b/src/testcurl/test_postform.c | |||
@@ -239,7 +239,7 @@ testMultithreadedPost () | |||
239 | cbc.buf = buf; | 239 | cbc.buf = buf; |
240 | cbc.size = 2048; | 240 | cbc.size = 2048; |
241 | cbc.pos = 0; | 241 | cbc.pos = 0; |
242 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 242 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
243 | 1081, NULL, NULL, &ahc_echo, NULL, | 243 | 1081, NULL, NULL, &ahc_echo, NULL, |
244 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 244 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
245 | MHD_OPTION_END); | 245 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index b87a139f..59cb1a67 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -206,7 +206,7 @@ testMultithreadedGet () | |||
206 | cbc.buf = buf; | 206 | cbc.buf = buf; |
207 | cbc.size = 2048; | 207 | cbc.size = 2048; |
208 | cbc.pos = 0; | 208 | cbc.pos = 0; |
209 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 209 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
210 | 21080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 210 | 21080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
211 | if (d == NULL) | 211 | if (d == NULL) |
212 | return 16; | 212 | return 16; |
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c index 19fcd07e..ef70eeac 100644 --- a/src/testcurl/test_put.c +++ b/src/testcurl/test_put.c | |||
@@ -187,7 +187,7 @@ testMultithreadedPut () | |||
187 | cbc.buf = buf; | 187 | cbc.buf = buf; |
188 | cbc.size = 2048; | 188 | cbc.size = 2048; |
189 | cbc.pos = 0; | 189 | cbc.pos = 0; |
190 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 190 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
191 | 1081, | 191 | 1081, |
192 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 192 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
193 | if (d == NULL) | 193 | if (d == NULL) |
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c index 25cfb5b4..db4db9d5 100644 --- a/src/testcurl/test_put_chunked.c +++ b/src/testcurl/test_put_chunked.c | |||
@@ -197,7 +197,7 @@ testMultithreadedPut () | |||
197 | cbc.buf = buf; | 197 | cbc.buf = buf; |
198 | cbc.size = 2048; | 198 | cbc.size = 2048; |
199 | cbc.pos = 0; | 199 | cbc.pos = 0; |
200 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 200 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
201 | 11081, | 201 | 11081, |
202 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 202 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
203 | if (d == NULL) | 203 | if (d == NULL) |
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c index 10577f26..b572cfb3 100644 --- a/src/testcurl/test_quiesce.c +++ b/src/testcurl/test_quiesce.c | |||
@@ -488,13 +488,13 @@ main (int argc, char *const *argv) | |||
488 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 488 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
489 | return 2; | 489 | return 2; |
490 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); | 490 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); |
491 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION, 0, 0); | 491 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); |
492 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 0); | 492 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 0); |
493 | errorCount += testExternalGet (); | 493 | errorCount += testExternalGet (); |
494 | if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL)) | 494 | if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL)) |
495 | { | 495 | { |
496 | errorCount += testGet(MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL); | 496 | errorCount += testGet(MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL); |
497 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION, 0, MHD_USE_POLL); | 497 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL); |
498 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, MHD_USE_POLL); | 498 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, MHD_USE_POLL); |
499 | } | 499 | } |
500 | if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_EPOLL)) | 500 | if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_EPOLL)) |
diff --git a/src/testcurl/test_start_stop.c b/src/testcurl/test_start_stop.c index 2e5c22c0..ac89340f 100644 --- a/src/testcurl/test_start_stop.c +++ b/src/testcurl/test_start_stop.c | |||
@@ -67,7 +67,7 @@ testMultithreadedGet (int poll_flag) | |||
67 | { | 67 | { |
68 | struct MHD_Daemon *d; | 68 | struct MHD_Daemon *d; |
69 | 69 | ||
70 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | poll_flag, | 70 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, |
71 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 71 | 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
72 | if (d == NULL) | 72 | if (d == NULL) |
73 | return 2; | 73 | return 2; |
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c index 1f7af82c..01a58193 100644 --- a/src/testcurl/test_termination.c +++ b/src/testcurl/test_termination.c | |||
@@ -91,7 +91,7 @@ main () | |||
91 | { | 91 | { |
92 | struct MHD_Daemon *daemon; | 92 | struct MHD_Daemon *daemon; |
93 | 93 | ||
94 | daemon = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 94 | daemon = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
95 | PORT, | 95 | PORT, |
96 | NULL, | 96 | NULL, |
97 | NULL, connection_handler, NULL, MHD_OPTION_END); | 97 | NULL, connection_handler, NULL, MHD_OPTION_END); |
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c index 62468b2c..ea1ace0b 100644 --- a/src/testzzuf/test_get.c +++ b/src/testzzuf/test_get.c | |||
@@ -148,7 +148,7 @@ testMultithreadedGet () | |||
148 | cbc.buf = buf; | 148 | cbc.buf = buf; |
149 | cbc.size = 2048; | 149 | cbc.size = 2048; |
150 | cbc.pos = 0; | 150 | cbc.pos = 0; |
151 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ , | 151 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , |
152 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 152 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
153 | if (d == NULL) | 153 | if (d == NULL) |
154 | return 16; | 154 | return 16; |
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c index 4524f2c4..79179c61 100644 --- a/src/testzzuf/test_get_chunked.c +++ b/src/testzzuf/test_get_chunked.c | |||
@@ -171,7 +171,7 @@ testMultithreadedGet () | |||
171 | cbc.buf = buf; | 171 | cbc.buf = buf; |
172 | cbc.size = 2048; | 172 | cbc.size = 2048; |
173 | cbc.pos = 0; | 173 | cbc.pos = 0; |
174 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ , | 174 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , |
175 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 175 | 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); |
176 | if (d == NULL) | 176 | if (d == NULL) |
177 | return 16; | 177 | return 16; |
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c index f0dc9632..7d8a2660 100644 --- a/src/testzzuf/test_post.c +++ b/src/testzzuf/test_post.c | |||
@@ -208,7 +208,7 @@ testMultithreadedPost () | |||
208 | cbc.buf = buf; | 208 | cbc.buf = buf; |
209 | cbc.size = 2048; | 209 | cbc.size = 2048; |
210 | cbc.pos = 0; | 210 | cbc.pos = 0; |
211 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ , | 211 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , |
212 | 11080, NULL, NULL, &ahc_echo, NULL, | 212 | 11080, NULL, NULL, &ahc_echo, NULL, |
213 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 213 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
214 | MHD_OPTION_END); | 214 | MHD_OPTION_END); |
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c index 3dee2515..c5e70262 100644 --- a/src/testzzuf/test_post_form.c +++ b/src/testzzuf/test_post_form.c | |||
@@ -227,7 +227,7 @@ testMultithreadedPost () | |||
227 | cbc.buf = buf; | 227 | cbc.buf = buf; |
228 | cbc.size = 2048; | 228 | cbc.size = 2048; |
229 | cbc.pos = 0; | 229 | cbc.pos = 0; |
230 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ , | 230 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , |
231 | 11080, NULL, NULL, &ahc_echo, NULL, | 231 | 11080, NULL, NULL, &ahc_echo, NULL, |
232 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 232 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
233 | MHD_OPTION_END); | 233 | MHD_OPTION_END); |
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c index 6bda2598..71d72853 100644 --- a/src/testzzuf/test_put.c +++ b/src/testzzuf/test_put.c | |||
@@ -179,7 +179,7 @@ testMultithreadedPut () | |||
179 | cbc.buf = buf; | 179 | cbc.buf = buf; |
180 | cbc.size = 2048; | 180 | cbc.size = 2048; |
181 | cbc.pos = 0; | 181 | cbc.pos = 0; |
182 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ , | 182 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , |
183 | 11080, | 183 | 11080, |
184 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 184 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
185 | if (d == NULL) | 185 | if (d == NULL) |
diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c index ed0a0a65..22a9e88e 100644 --- a/src/testzzuf/test_put_chunked.c +++ b/src/testzzuf/test_put_chunked.c | |||
@@ -185,7 +185,7 @@ testMultithreadedPut () | |||
185 | cbc.buf = buf; | 185 | cbc.buf = buf; |
186 | cbc.size = 2048; | 186 | cbc.size = 2048; |
187 | cbc.pos = 0; | 187 | cbc.pos = 0; |
188 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, | 188 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, |
189 | 11081, | 189 | 11081, |
190 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 190 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
191 | if (d == NULL) | 191 | if (d == NULL) |
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c index f6fd21d2..373ce3fd 100644 --- a/src/testzzuf/test_put_large.c +++ b/src/testzzuf/test_put_large.c | |||
@@ -194,7 +194,7 @@ testMultithreadedPut () | |||
194 | cbc.buf = buf; | 194 | cbc.buf = buf; |
195 | cbc.size = 2048; | 195 | cbc.size = 2048; |
196 | cbc.pos = 0; | 196 | cbc.pos = 0; |
197 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION /* | MHD_USE_DEBUG */ , | 197 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , |
198 | 11080, | 198 | 11080, |
199 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); | 199 | NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); |
200 | if (d == NULL) | 200 | if (d == NULL) |