libmicrohttpd

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

commit 87c722090cd0d9af97d2db5ed7c4c4b5a30fb1f5
parent 491d411a0173ffd71f089c938ef7a32bf9fc62b5
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon,  9 Jan 2017 21:55:51 +0300

Fixed processing of data in TLS buffers in epoll mode if more than 128 connections are ready

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

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -3773,6 +3773,13 @@ MHD_epoll (struct MHD_Daemon *daemon, else timeout_ms = 0; +#ifdef HTTPS_SUPPORT + /* Reset TLS read-ready. + * New value will be set by read handlers. */ + if ( 0 != (daemon->options & MHD_USE_TLS) ) + daemon->has_tls_recv_ready = false; +#endif /* HTTPS_SUPPORT */ + /* drain 'epoll' event queue; need to iterate as we get at most MAX_EVENTS in one system call here; in practice this should pretty much mean only one round, but better an extra loop here @@ -3797,12 +3804,6 @@ MHD_epoll (struct MHD_Daemon *daemon, #endif return MHD_NO; } -#ifdef HTTPS_SUPPORT - /* Reset TLS read-ready. - * New value will be set by read handlers. */ - if ( 0 != (daemon->options & MHD_USE_TLS) ) - daemon->has_tls_recv_ready = 0; -#endif /* HTTPS_SUPPORT */ for (i=0;i<(unsigned int) num_events;i++) { /* First, check for the values of `ptr` that would indicate