libmicrohttpd

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

commit b5bfa6ee2c0bfdc478ad2bf55f6b3bf997dabcd2
parent ab04f53b950cdaaee58607e9217159112e033372
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sun, 26 Mar 2017 12:40:43 +0300

Simplification: move external loop specific code from internal_run_from_select() to
 MHD_run_from_select().

Diffstat:
Msrc/microhttpd/daemon.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -3332,8 +3332,6 @@ internal_run_from_select (struct MHD_Daemon *daemon, struct MHD_UpgradeResponseHandle *urh; struct MHD_UpgradeResponseHandle *urhn; #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ - unsigned int mask = MHD_TEST_ALLOW_SUSPEND_RESUME | MHD_USE_INTERNAL_POLLING_THREAD; - /* Reset. New value will be set when connections are processed. */ /* Note: no-op for thread-per-connection as it is always false in that mode. */ daemon->data_already_pending = false; @@ -3346,10 +3344,6 @@ internal_run_from_select (struct MHD_Daemon *daemon, read_fd_set)) ) MHD_itc_clear_ (daemon->itc); - /* Resuming external connections when using an extern mainloop */ - if (MHD_TEST_ALLOW_SUSPEND_RESUME == (daemon->options & mask)) - resume_suspended_connections (daemon); - #ifdef EPOLL_SUPPORT if (0 != (daemon->options & MHD_USE_EPOLL)) { @@ -3477,6 +3471,10 @@ MHD_run_from_select (struct MHD_Daemon *daemon, return MHD_NO; #endif /* ! EPOLL_SUPPORT */ } + + /* Resuming external connections when using an extern mainloop */ + resume_suspended_connections (daemon); + return internal_run_from_select (daemon, read_fd_set, write_fd_set, except_fd_set); }