diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-02-12 17:33:33 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-02-19 18:37:55 +0300 |
commit | 0c8a6adb184e11a56550537526a5e6c2123ad2e2 (patch) | |
tree | e1399fff8b868d173b4677baeed22dcc6dfbd6da | |
parent | 1689dae34aa521ee693c58429f37c96aa21cb1ba (diff) | |
download | libmicrohttpd-0c8a6adb184e11a56550537526a5e6c2123ad2e2.tar.gz libmicrohttpd-0c8a6adb184e11a56550537526a5e6c2123ad2e2.zip |
Simplified checks for internal polling thread.
-rw-r--r-- | src/microhttpd/connection.c | 6 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 7cd60da9..3ce34f65 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -1410,8 +1410,7 @@ MHD_connection_update_event_loop_info (struct MHD_Connection *connection) | |||
1410 | { | 1410 | { |
1411 | if ((MHD_YES != try_grow_read_buffer (connection)) && | 1411 | if ((MHD_YES != try_grow_read_buffer (connection)) && |
1412 | (0 != (connection->daemon->options & | 1412 | (0 != (connection->daemon->options & |
1413 | (MHD_USE_INTERNAL_POLLING_THREAD | | 1413 | MHD_USE_INTERNAL_POLLING_THREAD))) |
1414 | MHD_USE_THREAD_PER_CONNECTION)))) | ||
1415 | { | 1414 | { |
1416 | /* failed to grow the read buffer, and the | 1415 | /* failed to grow the read buffer, and the |
1417 | client which is supposed to handle the | 1416 | client which is supposed to handle the |
@@ -2007,8 +2006,7 @@ process_request_body (struct MHD_Connection *connection) | |||
2007 | /* client did not process all POST data, complain if | 2006 | /* client did not process all POST data, complain if |
2008 | the setup was incorrect, which may prevent us from | 2007 | the setup was incorrect, which may prevent us from |
2009 | handling the rest of the request */ | 2008 | handling the rest of the request */ |
2010 | if ( ( (0 != (connection->daemon->options & MHD_USE_THREAD_PER_CONNECTION)) || | 2009 | if ( (0 != (connection->daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) && |
2011 | (0 != (connection->daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) ) && | ||
2012 | (! connection->suspended) ) | 2010 | (! connection->suspended) ) |
2013 | MHD_DLOG (connection->daemon, | 2011 | MHD_DLOG (connection->daemon, |
2014 | _("WARNING: incomplete POST processing and connection not suspended will result in hung connection.\n")); | 2012 | _("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 index 7c4dcde1..c83a51d5 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2998,7 +2998,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon, | |||
2998 | struct MHD_UpgradeResponseHandle *urhn; | 2998 | struct MHD_UpgradeResponseHandle *urhn; |
2999 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ | 2999 | #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ |
3000 | unsigned int mask = MHD_ALLOW_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNAL_THREAD | | 3000 | unsigned int mask = MHD_ALLOW_SUSPEND_RESUME | MHD_USE_EPOLL_INTERNAL_THREAD | |
3001 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL_INTERNAL_THREAD | MHD_USE_THREAD_PER_CONNECTION; | 3001 | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL_INTERNAL_THREAD; |
3002 | 3002 | ||
3003 | /* Clear ITC to avoid spinning select */ | 3003 | /* Clear ITC to avoid spinning select */ |
3004 | /* Do it before any other processing so new signals | 3004 | /* Do it before any other processing so new signals |