]> granicus.if.org Git - apache/commitdiff
in prefork, listensocks[0] doesn't have a pod
authorJeff Trawick <trawick@apache.org>
Sun, 11 Nov 2001 04:37:11 +0000 (04:37 +0000)
committerJeff Trawick <trawick@apache.org>
Sun, 11 Nov 2001 04:37:11 +0000 (04:37 +0000)
also, fix an ap_log_error() call to use ret for the error code
instead of errno

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91849 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c

index 656b0cabf327c870f73ef2d7590673ff8119bdcb..6f686ca1c358077fe9fae8819d917883a11e4363 100644 (file)
@@ -624,7 +624,7 @@ static void child_main(int child_num_arg)
                 * on Linux 2.0.x we seem to end up with EFAULT
                 * occasionally, and we'd loop forever due to it.
                 */
-               ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf,
+               ap_log_error(APLOG_MARK, APLOG_ERR, ret, ap_server_conf,
                              "apr_poll: (listen)");
                clean_child_exit(1);
             }
@@ -637,8 +637,8 @@ static void child_main(int child_num_arg)
                 curr_pollfd = last_pollfd;
                 do {
                     curr_pollfd++;
-                    if (curr_pollfd > num_listensocks) {
-                        curr_pollfd = 1;
+                    if (curr_pollfd >= num_listensocks) {
+                        curr_pollfd = 0;
                     }
                     /* XXX: Should we check for POLLERR? */
                     apr_poll_revents_get(&event, listensocks[curr_pollfd], pollset);