]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Win32: find_read_listeners was not correctly handling multiple listeners on the
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 8 Mar 2004 23:33:03 +0000 (23:33 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 8 Mar 2004 23:33:03 +0000 (23:33 +0000)
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

CHANGES
server/mpm/winnt/child.c

diff --git a/CHANGES b/CHANGES
index 7d71e09fedd0a7e1d2fa2efe3d8872570c88480e..0c046ec80cb268efcd287d2d5c15c8d3a931b3e1 100644 (file)
--- 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 <manniwood planet-save.com>]
 
index 89ca6648a092a2cd6606d2fd1129eb6272e3cceb..8109bb33938b2d0ea8f5ee0857b9faa68ba8eac1 100644 (file)
@@ -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);
         }
     }