From: Justin Erenkrantz Date: Mon, 8 Mar 2004 23:33:03 +0000 (+0000) Subject: Win32: find_read_listeners was not correctly handling multiple listeners on the X-Git-Tag: 2.0.49~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c22e324621e0e8103b2e54fae17602f7f9b1c33;p=thirdparty%2Fapache%2Fhttpd.git Win32: find_read_listeners was not correctly handling multiple listeners on the Win32DisableAcceptEx path Reviewed by: stoddard, trawick, ake git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102893 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7d71e09fedd..0c046ec80cb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.49 + *) Win32: find_read_listeners was not correctly handling multiple + listeners on the Win32DisableAcceptEx path. [Bill Stoddard] + *) Fix bug in mod_usertrack when no CookieName is set. PR 24483. [Manni Wood ] diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 89ca6648a09..8109bb33938 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -205,16 +205,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; } @@ -332,6 +337,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); } }