libmicrohttpd

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

commit 0c8a6adb184e11a56550537526a5e6c2123ad2e2
parent 1689dae34aa521ee693c58429f37c96aa21cb1ba
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sun, 12 Feb 2017 17:33:33 +0300

Simplified checks for internal polling thread.

Diffstat:
Msrc/microhttpd/connection.c | 6++----
Msrc/microhttpd/daemon.c | 2+-
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1410,8 +1410,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_INTERNAL_POLLING_THREAD | - MHD_USE_THREAD_PER_CONNECTION)))) + MHD_USE_INTERNAL_POLLING_THREAD))) { /* failed to grow the read buffer, and the client which is supposed to handle the @@ -2007,8 +2006,7 @@ process_request_body (struct MHD_Connection *connection) /* client did not process all POST data, complain if 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_INTERNAL_POLLING_THREAD)) ) && + if ( (0 != (connection->daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) && (! 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 @@ -2998,7 +2998,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon, struct MHD_UpgradeResponseHandle *urhn; #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ 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; + MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL_INTERNAL_THREAD; /* Clear ITC to avoid spinning select */ /* Do it before any other processing so new signals