]> granicus.if.org Git - apache/commitdiff
fix another seg fault.
authorGreg Ames <gregames@apache.org>
Thu, 11 Oct 2001 16:28:23 +0000 (16:28 +0000)
committerGreg Ames <gregames@apache.org>
Thu, 11 Oct 2001 16:28:23 +0000 (16:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91431 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c

index 186619c58ee64913ffb5b90b6e8e36f3384729d9..b2903441f31aff1b4f8fef2c40cc6ea28b89baed 100644 (file)
@@ -663,12 +663,14 @@ static void child_main(int child_num_arg)
                }
                first_lr=lr;
                do {
-                    apr_os_sock_get(&sockdes, lr->sd);
-                   if (FD_ISSET(sockdes, &main_fds))
-                       goto got_listener;
-                   lr = lr->next;
-                   if (!lr)
-                       lr = ap_listeners;
+                    if (lr->active) {
+                        apr_os_sock_get(&sockdes, lr->sd);
+                       if (FD_ISSET(sockdes, &main_fds))
+                           goto got_listener;
+                        lr = lr->next;
+                        if (!lr)
+                            lr = ap_listeners;
+                    }
                }
                while (lr != first_lr);
                /* FIXME: if we get here, something bad has happened, and we're