From 7e1daf6e514c3675cfa07c12d3245c85c7cda005 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sun, 11 Nov 2001 04:37:11 +0000 Subject: [PATCH] in prefork, listensocks[0] doesn't have a pod 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 656b0cabf3..6f686ca1c3 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -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); -- 2.50.1