From: Bill Stoddard Date: Sun, 29 Feb 2004 13:47:02 +0000 (+0000) Subject: Win32: find_read_listeners was not correctly handling multiple listeners on the Win32... X-Git-Tag: pre_ajp_proxy~599 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=547f7e0f1d081e299b144f10cce5e2b89e571f93;p=apache Win32: find_read_listeners was not correctly handling multiple listeners on the Win32DisableAcceptEx path git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102823 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 5c943a211b..2110b68e00 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -206,16 +206,21 @@ static APR_INLINE ap_listen_rec *find_ready_listener(fd_set * main_fds) ap_listen_rec *lr; SOCKET nsd; - for (lr = head_listener; lr ; lr = lr->next) { + lr = head_listener; + do { apr_os_sock_get(&nsd, lr->sd); - if (FD_ISSET(nsd, main_fds)) { - head_listener = lr->next; - if (head_listener == NULL) + if (FD_ISSET(nsd, main_fds)) { + head_listener = lr->next; + if (!head_listener) { head_listener = ap_listeners; - - return (lr); - } - } + } + return lr; + } + lr = lr->next; + if (!lr) { + lr = ap_listeners; + } + } while (lr != head_listener); return NULL; } @@ -333,6 +338,8 @@ static void win9x_accept(void * dummy) if (listenmaxfd == INVALID_SOCKET || nsd > listenmaxfd) { listenmaxfd = nsd; } + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, + "Child %d: Listening on port %d.", my_pid, lr->bind_addr->port); } }