On Tue, 30 Oct 2018 15:51:19 +0100 José Bollo <jo...@nonadev.net> wrote:
> Hi, > > I try to add the selection of the interfaces to serve on MHD. I was > using MHD_USE_EPOLL and was managing to include the epoll in the > external main loop with MHD_get_daemon_info(daemon, > MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY) -> listen_fd hum! ->epoll_fd is much better no? > But it appears that setting MHD_USE_EPOLL and MHD_USE_NO_LISTEN_SOCKET > together is unsupported. So it doesn't work. listen_fd is -1 always. > > I think that my expectation is valuable. Do you agree? > > Best regards > José Bollo The patch below seems okay: diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index cd2ca189..b877e560 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -5990,8 +5990,7 @@ MHD_start_daemon_va (unsigned int flags, #ifdef EPOLL_SUPPORT if ( (0 != (*pflags & MHD_USE_EPOLL)) && - (0 == daemon->worker_pool_size) && - (0 == (*pflags & MHD_USE_NO_LISTEN_SOCKET)) ) + (0 == daemon->worker_pool_size) ) { if (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION)) {