libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit a48ca85fb74479a8a81e137138a30fab58f3eb1e
parent 4e4a1ce2bb9f6cd1d38fdc5f169d8956afab70c0
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon,  7 Nov 2016 23:15:42 +0300

Renamed daemon flags:
MHD_USE_SELECT_INTERNALLY -> MHD_USE_INTERNAL_POLLING_THREAD
MHD_USE_POLL_INTERNALLY -> MHD_USE_POLL_INTERNAL_THREAD
MHD_USE_EPOLL_INTERNALLY -> MHD_USE_EPOLL_INTERNAL_THREAD

Diffstat:
Mdoc/chapters/hellobrowser.inc | 2+-
Mdoc/chapters/processingpost.inc | 2+-
Mdoc/chapters/tlsauthentication.inc | 6+++---
Mdoc/examples/basicauthentication.c | 2+-
Mdoc/examples/hellobrowser.c | 2+-
Mdoc/examples/largepost.c | 2+-
Mdoc/examples/logging.c | 2+-
Mdoc/examples/responseheaders.c | 2+-
Mdoc/examples/simplepost.c | 2+-
Mdoc/examples/tlsauthentication.c | 2+-
Mdoc/libmicrohttpd.texi | 12++++++------
Msrc/examples/benchmark.c | 2+-
Msrc/examples/benchmark_https.c | 2+-
Msrc/examples/chunked_example.c | 4++--
Msrc/examples/demo.c | 2+-
Msrc/examples/demo_https.c | 2+-
Msrc/examples/dual_stack_example.c | 2+-
Msrc/examples/minimal_example.c | 4++--
Msrc/examples/upgrade_example.c | 2+-
Msrc/include/microhttpd.h | 45+++++++++++++++++++++++++++++++++------------
Msrc/microhttpd/connection.c | 4++--
Msrc/microhttpd/daemon.c | 24++++++++++++------------
Msrc/microhttpd/test_daemon.c | 4++--
Msrc/microhttpd/test_upgrade.c | 14+++++++-------
Msrc/testcurl/https/test_empty_response.c | 2+-
Msrc/testcurl/https/test_https_get_parallel.c | 8++++----
Msrc/testcurl/perf_get.c | 4++--
Msrc/testcurl/perf_get_concurrent.c | 4++--
Msrc/testcurl/test_concurrent_stop.c | 2+-
Msrc/testcurl/test_delete.c | 4++--
Msrc/testcurl/test_digestauth.c | 2+-
Msrc/testcurl/test_digestauth_with_arguments.c | 2+-
Msrc/testcurl/test_get.c | 8++++----
Msrc/testcurl/test_get_chunked.c | 4++--
Msrc/testcurl/test_get_response_cleanup.c | 4++--
Msrc/testcurl/test_get_sendfile.c | 6+++---
Msrc/testcurl/test_iplimit.c | 4++--
Msrc/testcurl/test_large_put.c | 4++--
Msrc/testcurl/test_long_header.c | 4++--
Msrc/testcurl/test_post.c | 4++--
Msrc/testcurl/test_post_loop.c | 4++--
Msrc/testcurl/test_postform.c | 4++--
Msrc/testcurl/test_process_headers.c | 4++--
Msrc/testcurl/test_put.c | 4++--
Msrc/testcurl/test_put_chunked.c | 4++--
Msrc/testcurl/test_quiesce.c | 12++++++------
Msrc/testcurl/test_quiesce_stream.c | 2+-
Msrc/testcurl/test_start_stop.c | 4++--
Msrc/testcurl/test_timeout.c | 4++--
Msrc/testcurl/test_urlparse.c | 2+-
Msrc/testzzuf/test_get.c | 2+-
Msrc/testzzuf/test_get_chunked.c | 2+-
Msrc/testzzuf/test_long_header.c | 4++--
Msrc/testzzuf/test_post.c | 2+-
Msrc/testzzuf/test_post_form.c | 2+-
Msrc/testzzuf/test_put.c | 2+-
Msrc/testzzuf/test_put_chunked.c | 2+-
Msrc/testzzuf/test_put_large.c | 2+-
58 files changed, 148 insertions(+), 127 deletions(-)

diff --git a/doc/chapters/hellobrowser.inc b/doc/chapters/hellobrowser.inc @@ -95,7 +95,7 @@ int main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_END); if (NULL == daemon) return 1; diff --git a/doc/chapters/processingpost.inc b/doc/chapters/processingpost.inc @@ -134,7 +134,7 @@ in the main function. @verbatim ... -daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, +daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_NOTIFY_COMPLETED, &request_completed, NULL, MHD_OPTION_END); diff --git a/doc/chapters/tlsauthentication.inc b/doc/chapters/tlsauthentication.inc @@ -68,7 +68,7 @@ main () and then we point the @emph{MHD} daemon to it upon initalization. @verbatim - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_HTTPS_MEM_KEY, key_pem, @@ -138,7 +138,7 @@ To do this, you will need to link your application against @emph{gnutls}. Next, when you start the MHD daemon, you must specify the root CA that you're willing to trust: @verbatim - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_HTTPS_MEM_KEY, key_pem, @@ -326,7 +326,7 @@ of one domain is that you need to provide a callback instead of the key and certificate. For example, when you start the MHD daemon, you could do this: @verbatim - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_HTTPS_CERT_CALLBACK, &sni_callback, diff --git a/doc/examples/basicauthentication.c b/doc/examples/basicauthentication.c @@ -71,7 +71,7 @@ main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_END); if (NULL == daemon) return 1; diff --git a/doc/examples/hellobrowser.c b/doc/examples/hellobrowser.c @@ -39,7 +39,7 @@ main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_END); if (NULL == daemon) return 1; diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c @@ -282,7 +282,7 @@ main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_NOTIFY_COMPLETED, &request_completed, NULL, diff --git a/doc/examples/logging.c b/doc/examples/logging.c @@ -43,7 +43,7 @@ main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_END); if (NULL == daemon) return 1; diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c @@ -73,7 +73,7 @@ main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_END); if (NULL == daemon) return 1; diff --git a/doc/examples/simplepost.c b/doc/examples/simplepost.c @@ -183,7 +183,7 @@ main () { struct MHD_Daemon *daemon; - daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, + daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_NOTIFY_COMPLETED, request_completed, NULL, MHD_OPTION_END); diff --git a/doc/examples/tlsauthentication.c b/doc/examples/tlsauthentication.c @@ -254,7 +254,7 @@ main () } daemon = - MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS, PORT, NULL, + MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS, PORT, NULL, NULL, &answer_to_connection, NULL, MHD_OPTION_HTTPS_MEM_KEY, key_pem, MHD_OPTION_HTTPS_MEM_CERT, cert_pem, MHD_OPTION_END); diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi @@ -436,14 +436,14 @@ compiler). Options for the MHD daemon. Note that if neither @code{MHD_USE_THREAD_PER_CONNECTION} nor -@code{MHD_USE_SELECT_INTERNALLY} is used, the client wants control over +@code{MHD_USE_INTERNAL_POLLING_THREAD} is used, the client wants control over the process and will call the appropriate microhttpd callbacks. Starting the daemon may also fail if a particular option is not implemented or not supported on the target platform (i.e. no support for @acronym{SSL}, threads or IPv6). SSL support generally depends on options given during MHD compilation. Threaded operations -(including @code{MHD_USE_SELECT_INTERNALLY}) are not supported on +(including @code{MHD_USE_INTERNAL_POLLING_THREAD}) are not supported on Symbian. @table @code @@ -468,7 +468,7 @@ NULL. @item MHD_USE_THREAD_PER_CONNECTION Run using one thread per connection. -@item MHD_USE_SELECT_INTERNALLY +@item MHD_USE_INTERNAL_POLLING_THREAD Run using an internal thread doing @code{SELECT}. @item MHD_USE_IPv6 @@ -890,7 +890,7 @@ with the "--disable-messages" flag. Number (unsigned int) of threads in thread pool. Enable thread pooling by setting this value to to something greater than 1. Currently, thread model must be -MHD_USE_SELECT_INTERNALLY if thread pooling is enabled +MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled (@code{MHD_start_daemon} returns @code{NULL} for an unsupported thread model). @@ -2663,7 +2663,7 @@ Request the file-descriptor number that MHD is using for epoll. If the build is not supporting epoll, NULL is returned; if we are using a thread pool or this daemon was not started with @code{MHD_USE_EPOLL}, (a pointer to) -1 is returned. If we are -using @code{MHD_USE_SELECT_INTERNALLY} or are in 'external' select mode, the +using @code{MHD_USE_INTERNAL_POLLING_THREAD} or are in 'external' select mode, the internal epoll FD is returned. This function must be used in external select mode with epoll to obtain the FD to call epoll on. No extra arguments should be passed. @@ -2891,7 +2891,7 @@ MHD_USE_POLL can be used. @item MHD_FEATURE_EPOLL Get whether @code{epoll()} is supported. If supported then Flags MHD_USE_EPOLL and -MHD_USE_EPOLL_INTERNALLY can be used. +MHD_USE_EPOLL_INTERNAL_THREAD can be used. @item MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET Get whether shutdown on listen socket to signal other diff --git a/src/examples/benchmark.c b/src/examples/benchmark.c @@ -134,7 +134,7 @@ main (int argc, char *const *argv) MHD_HTTP_HEADER_CONNECTION, "close"); #endif - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_SUPPRESS_DATE_NO_CLOCK + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SUPPRESS_DATE_NO_CLOCK #ifdef EPOLL_SUPPORT | MHD_USE_EPOLL | MHD_USE_EPOLL_TURBO #endif diff --git a/src/examples/benchmark_https.c b/src/examples/benchmark_https.c @@ -180,7 +180,7 @@ main (int argc, char *const *argv) response = MHD_create_response_from_buffer (strlen (PAGE), (void *) PAGE, MHD_RESPMEM_PERSISTENT); - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS #ifdef EPOLL_SUPPORT | MHD_USE_EPOLL | MHD_USE_EPOLL_TURBO #endif diff --git a/src/examples/chunked_example.c b/src/examples/chunked_example.c @@ -78,8 +78,8 @@ main (int argc, char *const *argv) printf ("%s PORT\n", argv[0]); return 1; } - d = MHD_start_daemon (// MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_POLL, - MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (// MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | MHD_USE_POLL, + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | MHD_USE_POLL, // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, atoi (argv[1]), diff --git a/src/examples/demo.c b/src/examples/demo.c @@ -883,7 +883,7 @@ main (int argc, char *const *argv) MHD_RESPMEM_PERSISTENT); mark_as_html (internal_error_response); update_directory (); - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG #ifdef EPOLL_SUPPORT | MHD_USE_EPOLL #endif diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c @@ -932,7 +932,7 @@ main (int argc, char *const *argv) MHD_RESPMEM_PERSISTENT); mark_as_html (internal_error_response); update_directory (); - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_TLS + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | MHD_USE_TLS #ifdef EPOLL_SUPPORT | MHD_USE_EPOLL #endif diff --git a/src/examples/dual_stack_example.c b/src/examples/dual_stack_example.c @@ -68,7 +68,7 @@ main (int argc, char *const *argv) printf ("%s PORT\n", argv[0]); return 1; } - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_DUAL_STACK, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | MHD_USE_DUAL_STACK, atoi (argv[1]), NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 120, diff --git a/src/examples/minimal_example.c b/src/examples/minimal_example.c @@ -67,8 +67,8 @@ main (int argc, char *const *argv) printf ("%s PORT\n", argv[0]); return 1; } - d = MHD_start_daemon (// MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | MHD_USE_POLL, - MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (// MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | MHD_USE_POLL, + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG | MHD_USE_POLL, // MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, atoi (argv[1]), diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c @@ -275,7 +275,7 @@ main (int argc, printf ("%s PORT\n", argv[0]); return 1; } - d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, atoi (argv[1]), NULL, NULL, &ahc_echo, NULL, diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -517,7 +517,7 @@ struct MHD_PostProcessor; * @brief Flags for the `struct MHD_Daemon`. * * Note that if neither #MHD_USE_THREAD_PER_CONNECTION nor - * #MHD_USE_SELECT_INTERNALLY is used, the client wants control over + * #MHD_USE_INTERNAL_POLLING_THREAD is used, the client wants control over * the process and will call the appropriate microhttpd callbacks. * * Starting the daemon may also fail if a particular option is not @@ -557,9 +557,16 @@ enum MHD_FLAG MHD_USE_THREAD_PER_CONNECTION = 4, /** - * Run using an internal thread (or thread pool) doing `select()`. + * Run using an internal thread (or thread pool) for sockets sending + * and receiving and data processing. */ + MHD_USE_INTERNAL_POLLING_THREAD = 8, + + /** @deprecated */ MHD_USE_SELECT_INTERNALLY = 8, +#define MHD_USE_SELECT_INTERNALLY \ + _MHD_DEPR_IN_MACRO("Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \ + MHD_USE_INTERNAL_POLLING_THREAD /** * Run using the IPv6 protocol (otherwise, MHD will just support @@ -584,16 +591,24 @@ enum MHD_FLAG /** * Use `poll()` instead of `select()`. This allows sockets with `fd >= * FD_SETSIZE`. This option is not compatible with using an - * 'external' `select()` mode (as there is no API to get the file - * descriptors for the external select from MHD) and must also not + * 'external' polling mode (as there is no API to get the file + * descriptors for the external poll() from MHD) and must also not * be used in combination with #MHD_USE_EPOLL. + * @sa ::MHD_FEATURE_POLL, #MHD_USE_POLL_INTERNAL_THREAD */ MHD_USE_POLL = 64, /** * Run using an internal thread (or thread pool) doing `poll()`. + * @sa ::MHD_FEATURE_POLL, #MHD_USE_POLL, #MHD_USE_INTERNAL_POLLING_THREAD */ - MHD_USE_POLL_INTERNALLY = MHD_USE_SELECT_INTERNALLY | MHD_USE_POLL, + MHD_USE_POLL_INTERNAL_THREAD = MHD_USE_POLL | MHD_USE_INTERNAL_POLLING_THREAD, + + /** @deprecated */ + MHD_USE_POLL_INTERNALLY = MHD_USE_POLL | MHD_USE_INTERNAL_POLLING_THREAD, +#define MHD_USE_POLL_INTERNALLY \ + _MHD_DEPR_IN_MACRO("Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \ + MHD_USE_POLL_INTERNAL_THREAD /** * Suppress (automatically) adding the 'Date:' header to HTTP responses. @@ -633,15 +648,21 @@ enum MHD_FLAG /** * Run using an internal thread (or thread pool) doing `epoll()`. - * This option is only available on Linux; using the option on - * non-Linux systems will cause #MHD_start_daemon to fail. + * This option is only available on certain platforms; using the option on + * platform without `epoll` support will cause #MHD_start_daemon to fail. + * @sa ::MHD_FEATURE_EPOLL, #MHD_USE_EPOLL, #MHD_USE_INTERNAL_POLLING_THREAD */ - MHD_USE_EPOLL_INTERNALLY = MHD_USE_SELECT_INTERNALLY | MHD_USE_EPOLL, + MHD_USE_EPOLL_INTERNAL_THREAD = MHD_USE_EPOLL | MHD_USE_INTERNAL_POLLING_THREAD, /** @deprecated */ + MHD_USE_EPOLL_INTERNALLY = MHD_USE_EPOLL | MHD_USE_INTERNAL_POLLING_THREAD, +#define MHD_USE_EPOLL_INTERNALLY \ + _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \ + MHD_USE_EPOLL_INTERNAL_THREAD +/** @deprecated */ #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \ - _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNALLY") \ - MHD_USE_EPOLL_INTERNALLY + _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \ + MHD_USE_EPOLL_INTERNAL_THREAD /** * Use inter-thread communication channel. @@ -869,7 +890,7 @@ enum MHD_OPTION * Number (`unsigned int`) of threads in thread pool. Enable * thread pooling by setting this value to to something * greater than 1. Currently, thread model must be - * #MHD_USE_SELECT_INTERNALLY if thread pooling is enabled + * #MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled * (#MHD_start_daemon returns NULL for an unsupported thread * model). */ @@ -2795,7 +2816,7 @@ enum MHD_FEATURE /** * Get whether `epoll()` is supported. If supported then Flags * #MHD_USE_EPOLL and - * #MHD_USE_EPOLL_INTERNALLY can be used. + * #MHD_USE_EPOLL_INTERNAL_THREAD can be used. */ MHD_FEATURE_EPOLL = 7, diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1411,7 +1411,7 @@ MHD_connection_update_event_loop_info (struct MHD_Connection *connection) { if ((MHD_YES != try_grow_read_buffer (connection)) && (0 != (connection->daemon->options & - (MHD_USE_SELECT_INTERNALLY | + (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION)))) { /* failed to grow the read buffer, and the @@ -2009,7 +2009,7 @@ process_request_body (struct MHD_Connection *connection) the setup was incorrect, which may prevent us from handling the rest of the request */ if ( ( (0 != (connection->daemon->options & MHD_USE_THREAD_PER_CONNECTION)) || - (0 != (connection->daemon->options & MHD_USE_SELECT_INTERNALLY)) ) && + (0 != (connection->daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) ) && (MHD_NO == connection->suspended) ) MHD_DLOG (connection->daemon, _("WARNING: incomplete POST processing and connection not suspended will result in hung connection.\n")); diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2957,8 +2957,8 @@ MHD_run_from_select (struct MHD_Daemon *daemon, struct MHD_UpgradeResponseHandle *urh; struct MHD_UpgradeResponseHandle *urhn; #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ - unsigned int mask = MHD_ALLOW_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNALLY | - MHD_USE_SELECT_INTERNALLY | MHD_USE_POLL_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION; + unsigned int mask = MHD_ALLOW_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNAL_THREAD | + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL_INTERNAL_THREAD | MHD_USE_THREAD_PER_CONNECTION; /* Clear ITC to avoid spinning select */ /* Do it before any other processing so new signals @@ -3904,7 +3904,7 @@ MHD_run (struct MHD_Daemon *daemon) { if ( (MHD_YES == daemon->shutdown) || (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) || - (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) ) + (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) ) return MHD_NO; if (0 != (daemon->options & MHD_USE_POLL)) { @@ -4089,7 +4089,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) if (MHD_INVALID_SOCKET == ret) return MHD_INVALID_SOCKET; if ( (MHD_ITC_IS_INVALID_(daemon->itc)) && - (0 != (daemon->options & (MHD_USE_SELECT_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION))) ) + (0 != (daemon->options & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION))) ) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, @@ -4786,7 +4786,7 @@ MHD_start_daemon_va (unsigned int flags, #else use_itc = 1; /* yes, must use ITC to signal thread */ #endif - if (0 == (flags & (MHD_USE_SELECT_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION))) + if (0 == (flags & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION))) use_itc = 0; /* useless if we are using 'external' select */ if (use_itc) { @@ -4890,18 +4890,18 @@ MHD_start_daemon_va (unsigned int flags, #endif /* Thread pooling currently works only with internal select thread model */ - if ( (0 == (flags & MHD_USE_SELECT_INTERNALLY)) && + if ( (0 == (flags & MHD_USE_INTERNAL_POLLING_THREAD)) && (daemon->worker_pool_size > 0) ) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, - _("MHD thread pooling only works with MHD_USE_SELECT_INTERNALLY\n")); + _("MHD thread pooling only works with MHD_USE_INTERNAL_POLLING_THREAD\n")); #endif goto free_and_fail; } #ifdef __SYMBIAN32__ - if (0 != (flags & (MHD_USE_SELECT_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION))) + if (0 != (flags & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION))) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, @@ -5234,7 +5234,7 @@ MHD_start_daemon_va (unsigned int flags, } #endif /* HTTPS_SUPPORT */ if ( ( (0 != (flags & MHD_USE_THREAD_PER_CONNECTION)) || - ( (0 != (flags & MHD_USE_SELECT_INTERNALLY)) && + ( (0 != (flags & MHD_USE_INTERNAL_POLLING_THREAD)) && (0 == daemon->worker_pool_size)) ) && (0 == (daemon->options & MHD_USE_NO_LISTEN_SOCKET)) && (! MHD_create_named_thread_ (&daemon->pid, @@ -5282,7 +5282,7 @@ MHD_start_daemon_va (unsigned int flags, memcpy (d, daemon, sizeof (struct MHD_Daemon)); /* Adjust pooling params for worker daemons; note that memcpy() - has already copied MHD_USE_SELECT_INTERNALLY thread model into + has already copied MHD_USE_INTERNAL_POLLING_THREAD thread model into the worker threads. */ d->master = daemon; d->worker_pool_size = 0; @@ -5365,7 +5365,7 @@ thread_failed: /* If no worker threads created, then shut down normally. Calling MHD_stop_daemon (as we do below) doesn't work here since it assumes a 0-sized thread pool means we had been in the default - MHD_USE_SELECT_INTERNALLY mode. */ + MHD_USE_INTERNAL_POLLING_THREAD mode. */ if (0 == i) { if (MHD_INVALID_SOCKET != socket_fd) @@ -5619,7 +5619,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon) fd = daemon->socket_fd; daemon->socket_fd = MHD_INVALID_SOCKET; - if ( (0 != (daemon->options & MHD_USE_SELECT_INTERNALLY)) || + if ( (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) || (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ) { /* Separate thread(s) is used for select()/poll()/etc. */ diff --git a/src/microhttpd/test_daemon.c b/src/microhttpd/test_daemon.c @@ -75,7 +75,7 @@ testStartStop () { struct MHD_Daemon *d; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, &apc_nothing, NULL, &ahc_nothing, NULL, MHD_OPTION_END); @@ -124,7 +124,7 @@ static int testThread () { struct MHD_Daemon *d; - d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_SELECT_INTERNALLY, + d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_INTERNAL_POLLING_THREAD, 1082, &apc_all, NULL, &ahc_nothing, NULL, MHD_OPTION_END); diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c @@ -1064,7 +1064,7 @@ test_upgrade (int flags, &run_usock_client, &sock)) abort (); - if (0 == (flags & (MHD_USE_SELECT_INTERNALLY | + if (0 == (flags & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION)) ) run_mhd_loop (d, flags); pthread_join (pt_client, @@ -1176,14 +1176,14 @@ main (int argc, #endif /* HAVE_POLL */ /* Test different event loops, with and without thread pool */ - res = test_upgrade (MHD_USE_SELECT_INTERNALLY, + res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD, 0); error_count += res; if (res) fprintf (stderr, "FAILED: Upgrade with internal select, return code %d.\n", res); else if (verbose) printf ("PASSED: Upgrade with internal select.\n"); - res = test_upgrade (MHD_USE_SELECT_INTERNALLY, + res = test_upgrade (MHD_USE_INTERNAL_POLLING_THREAD, 2); error_count += res; if (res) @@ -1191,14 +1191,14 @@ main (int argc, else if (verbose) printf ("PASSED: Upgrade with internal select with thread pool.\n"); #ifdef HAVE_POLL - res = test_upgrade (MHD_USE_POLL_INTERNALLY, + res = test_upgrade (MHD_USE_POLL_INTERNAL_THREAD, 0); error_count += res; if (res) fprintf (stderr, "FAILED: Upgrade with internal poll, return code %d.\n", res); else if (verbose) printf ("PASSED: Upgrade with internal poll.\n"); - res = test_upgrade (MHD_USE_POLL_INTERNALLY, + res = test_upgrade (MHD_USE_POLL_INTERNAL_THREAD, 2); if (res) fprintf (stderr, "FAILED: Upgrade with internal poll with thread pool, return code %d.\n", res); @@ -1206,13 +1206,13 @@ main (int argc, printf ("PASSED: Upgrade with internal poll with thread pool.\n"); #endif #ifdef EPOLL_SUPPORT - res = test_upgrade (MHD_USE_EPOLL_INTERNALLY, + res = test_upgrade (MHD_USE_EPOLL_INTERNAL_THREAD, 0); if (res) fprintf (stderr, "FAILED: Upgrade with internal epoll, return code %d.\n", res); else if (verbose) printf ("PASSED: Upgrade with internal epoll.\n"); - res = test_upgrade (MHD_USE_EPOLL_INTERNALLY, + res = test_upgrade (MHD_USE_EPOLL_INTERNAL_THREAD, 2); if (res) fprintf (stderr, "FAILED: Upgrade with internal epoll, return code %d.\n", res); diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c @@ -80,7 +80,7 @@ testInternalSelectGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_TLS | MHD_USE_SELECT_INTERNALLY, + d = MHD_start_daemon (MHD_USE_DEBUG | MHD_USE_TLS | MHD_USE_INTERNAL_POLLING_THREAD, 1082, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c @@ -151,7 +151,7 @@ main (int argc, char *const *argv) errorCount += test_wrap ("single threaded daemon, single client, epoll", &test_single_client, NULL, - MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_EPOLL, + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_EPOLL, aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, MHD_OPTION_END); @@ -159,7 +159,7 @@ main (int argc, char *const *argv) errorCount += test_wrap ("single threaded daemon, single client", &test_single_client, NULL, - MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG, + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG, aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, MHD_OPTION_END); @@ -167,7 +167,7 @@ main (int argc, char *const *argv) errorCount += test_wrap ("single threaded daemon, parallel clients, epoll", &test_parallel_clients, NULL, - MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_EPOLL, + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG | MHD_USE_EPOLL, aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, MHD_OPTION_END); @@ -175,7 +175,7 @@ main (int argc, char *const *argv) errorCount += test_wrap ("single threaded daemon, parallel clients", &test_parallel_clients, NULL, - MHD_USE_SELECT_INTERNALLY | MHD_USE_TLS | MHD_USE_DEBUG, + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_DEBUG, aes256_sha, CURL_SSLVERSION_TLSv1, MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, MHD_OPTION_END); diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c @@ -192,7 +192,7 @@ testInternalGet (int port, int poll_flag) cbc.buf = buf; cbc.size = 2048; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -311,7 +311,7 @@ testMultithreadedPoolGet (int port, int poll_flag) cbc.buf = buf; cbc.size = 2048; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c @@ -236,7 +236,7 @@ testInternalGet (int port, int poll_flag) const char * const test_desc = poll_flag ? "internal poll" : "internal select"; const char * ret_val; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -287,7 +287,7 @@ testMultithreadedPoolGet (int port, int poll_flag) const char * const test_desc = poll_flag ? "thread pool with poll" : "thread pool with select"; const char * ret_val; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c @@ -232,7 +232,7 @@ testMultithreadedPoolGet (int port, struct MHD_Daemon *d; pthread_t p; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, port, NULL, NULL, &ahc_echo, "GET", diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c @@ -131,7 +131,7 @@ testInternalDelete () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); if (d == NULL) @@ -247,7 +247,7 @@ testMultithreadedPoolDelete () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c @@ -189,7 +189,7 @@ testDigestAuth () return 1; } #endif - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1337, NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (rnd), rnd, MHD_OPTION_NONCE_NC_SIZE, 300, diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c @@ -184,7 +184,7 @@ testDigestAuth () return 1; } #endif - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1337, NULL, NULL, &ahc_echo, PAGE, MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (rnd), rnd, MHD_OPTION_NONCE_NC_SIZE, 300, diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c @@ -120,7 +120,7 @@ testInternalGet (int poll_flag) cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -220,7 +220,7 @@ testMultithreadedPoolGet (int poll_flag) cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) @@ -412,7 +412,7 @@ testUnknownPortGet (int poll_flag) cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 1, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_SOCK_ADDR, &addr, MHD_OPTION_END); @@ -571,7 +571,7 @@ testEmptyGet (int poll_flag) cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 11081, NULL, NULL, &ahc_empty, NULL, MHD_OPTION_END); if (d == NULL) return 4194304; diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c @@ -164,7 +164,7 @@ testInternalGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -248,7 +248,7 @@ testMultithreadedPoolGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c @@ -150,7 +150,7 @@ testInternalGet () pid_t curl; ok = 1; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -207,7 +207,7 @@ testMultithreadedPoolGet () struct MHD_Daemon *d; pid_t curl; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c @@ -125,7 +125,7 @@ testInternalGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -225,7 +225,7 @@ testMultithreadedPoolGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) @@ -417,7 +417,7 @@ testUnknownPortGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_SOCK_ADDR, &addr, MHD_OPTION_END); diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c @@ -117,7 +117,7 @@ testMultithreadedGet () if (!oneone) return 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2, @@ -208,7 +208,7 @@ testMultithreadedPoolGet () if (!oneone) return 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c @@ -152,7 +152,7 @@ testInternalPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (1024*1024), @@ -271,7 +271,7 @@ testMultithreadedPoolPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c @@ -101,7 +101,7 @@ testLongUrlGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 1080, &apc_all, NULL, @@ -172,7 +172,7 @@ testLongHeaderGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 1080, &apc_all, NULL, diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c @@ -170,7 +170,7 @@ testInternalPost () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, MHD_OPTION_END); @@ -278,7 +278,7 @@ testMultithreadedPoolPost () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c @@ -119,7 +119,7 @@ testInternalPost () cbc.buf = buf; cbc.size = 2048; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); if (d == NULL) return 1; @@ -247,7 +247,7 @@ testMultithreadedPoolPost () cbc.buf = buf; cbc.size = 2048; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c @@ -183,7 +183,7 @@ testInternalPost () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, MHD_OPTION_END); @@ -295,7 +295,7 @@ testMultithreadedPoolPost () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c @@ -157,7 +157,7 @@ testInternalGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 21080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -255,7 +255,7 @@ testMultithreadedPoolGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 21080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c @@ -131,7 +131,7 @@ testInternalPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); if (d == NULL) @@ -244,7 +244,7 @@ testMultithreadedPoolPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1081, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c @@ -141,7 +141,7 @@ testInternalPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 11080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); if (d == NULL) @@ -254,7 +254,7 @@ testMultithreadedPoolPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 11081, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c @@ -487,20 +487,20 @@ main (int argc, char *const *argv) if (0 != curl_global_init (CURL_GLOBAL_WIN32)) return 2; - errorCount += testGet (MHD_USE_SELECT_INTERNALLY, 0, 0); + errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION, 0, 0); - errorCount += testGet (MHD_USE_SELECT_INTERNALLY, CPU_COUNT, 0); + errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 0); errorCount += testExternalGet (); if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL)) { - errorCount += testGet(MHD_USE_SELECT_INTERNALLY, 0, MHD_USE_POLL); + errorCount += testGet(MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL); errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION, 0, MHD_USE_POLL); - errorCount += testGet (MHD_USE_SELECT_INTERNALLY, CPU_COUNT, MHD_USE_POLL); + errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, MHD_USE_POLL); } if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_EPOLL)) { - errorCount += testGet (MHD_USE_SELECT_INTERNALLY, 0, MHD_USE_EPOLL); - errorCount += testGet (MHD_USE_SELECT_INTERNALLY, CPU_COUNT, MHD_USE_EPOLL); + errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_EPOLL); + errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, MHD_USE_EPOLL); } if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); diff --git a/src/testcurl/test_quiesce_stream.c b/src/testcurl/test_quiesce_stream.c @@ -168,7 +168,7 @@ main() /* Flags */ unsigned int daemon_flags - = MHD_USE_SELECT_INTERNALLY + = MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_EPOLL | MHD_ALLOW_SUSPEND_RESUME | MHD_USE_ITC; diff --git a/src/testcurl/test_start_stop.c b/src/testcurl/test_start_stop.c @@ -54,7 +54,7 @@ testInternalGet (int poll_flag) { struct MHD_Daemon *d; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; @@ -80,7 +80,7 @@ testMultithreadedPoolGet (int poll_flag) { struct MHD_Daemon *d; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 1081, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); if (d == NULL) diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c @@ -172,7 +172,7 @@ testWithoutTimeout () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_CONNECTION_TIMEOUT, 2, @@ -227,7 +227,7 @@ testWithTimeout () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 1080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_CONNECTION_TIMEOUT, 2, diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c @@ -134,7 +134,7 @@ testInternalGet (int poll_flag) cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG | poll_flag, 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c @@ -104,7 +104,7 @@ testInternalGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c @@ -130,7 +130,7 @@ testInternalGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); if (d == NULL) return 1; diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c @@ -103,7 +103,7 @@ testLongUrlGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, &apc_all, NULL, @@ -165,7 +165,7 @@ testLongHeaderGet () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, &apc_all, NULL, diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c @@ -157,7 +157,7 @@ testInternalPost () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, MHD_OPTION_END); diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c @@ -176,7 +176,7 @@ testInternalPost () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, MHD_OPTION_END); diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c @@ -128,7 +128,7 @@ testInternalPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); if (d == NULL) diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c @@ -134,7 +134,7 @@ testInternalPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_DEBUG, 11080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); if (d == NULL) diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c @@ -142,7 +142,7 @@ testInternalPut () cbc.buf = buf; cbc.size = 2048; cbc.pos = 0; - d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY /* | MHD_USE_DEBUG */ , + d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD /* | MHD_USE_DEBUG */ , 11080, NULL, NULL, &ahc_echo, &done_flag, MHD_OPTION_END); if (d == NULL)