libmicrohttpd

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

commit 875e27c51b57bd8bfa7109c61c92d7b4678b204f
parent 681000855a41e11a06f8ba22b7afffb7bb15811c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 15 Mar 2017 23:36:27 +0300

MHD_run_from_select(): removed ability to run epoll
fd_sets don not provide any useful information for epoll, so MHD_run() should be used
for epoll-based daemons.

Diffstat:
MChangeLog | 7+++++++
Msrc/microhttpd/daemon.c | 13+------------
2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +Wed Mar 15 23:29:59 MSK 2017 + Prevented socket read/write if connection is suspended. + Added missing resets of 'connection->in_idle'. + Reworked handling of suspended connection: ensure that + connection is not disconnected by timeout, always + updated read/write states right after suspending. -EG + Wed Mar 15 21:02:26 MSK 2017 Added new enum value MHD_CONNECTION_INFO_CONNECTION_TIMEOUT to get connection timeout by MHD_get_connection_info(). -EG diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -3436,7 +3436,7 @@ MHD_run_from_select (struct MHD_Daemon *daemon, { fd_set es; if (0 != (daemon->options & - (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL)) ) + (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_POLL | MHD_USE_EPOLL)) ) return MHD_NO; if (NULL == read_fd_set || NULL == write_fd_set) return MHD_NO; @@ -3450,17 +3450,6 @@ MHD_run_from_select (struct MHD_Daemon *daemon, FD_ZERO (&es); except_fd_set = &es; } - if (0 != (daemon->options & MHD_USE_EPOLL)) - { -#ifdef EPOLL_SUPPORT - int ret; - ret = MHD_epoll (daemon, MHD_NO); - MHD_cleanup_connections (daemon); - return ret; -#else /* ! EPOLL_SUPPORT */ - return MHD_NO; -#endif /* ! EPOLL_SUPPORT */ - } return internal_run_from_select (daemon, read_fd_set, write_fd_set, except_fd_set); }