From: Ryan Bloom Date: Wed, 17 Jul 2002 18:42:54 +0000 (+0000) Subject: Get the prefork MPM using the apr_poll interface directly instead of going X-Git-Tag: 2.0.40~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a87da6603e09cc629324162ff9d5c9c9cf5cab3c;p=apache Get the prefork MPM using the apr_poll interface directly instead of going through the old functions which are only still available for backwards compat. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96102 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 9c9b7f6f0f..fab9a38608 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -593,9 +593,13 @@ static void child_main(int child_num_arg) listensocks[i].sd = lr->sd; } - apr_poll_setup(&pollset, num_listensocks, pchild); - for (i = 0; i < num_listensocks; i++) - apr_poll_socket_add(pollset, listensocks[i].sd, APR_POLLIN); + pollset = apr_palloc(pchild, sizeof(*pollset) * num_listensocks); + pollset[0].p = pchild; + for (i = 0; i < num_listensocks; i++) { + pollset[i].desc.s = listensocks[i].sd; + pollset[i].desc_type = APR_POLL_SOCKET; + pollset[i].reqevents = APR_POLLIN; + } bucket_alloc = apr_bucket_alloc_create(pchild); @@ -655,8 +659,7 @@ static void child_main(int child_num_arg) curr_pollfd = 0; } /* XXX: Should we check for POLLERR? */ - apr_poll_revents_get(&event, listensocks[curr_pollfd].sd, pollset); - if (event & APR_POLLIN) { + if (pollset[curr_pollfd].rtnevents & APR_POLLIN) { last_pollfd = curr_pollfd; offset = curr_pollfd; goto got_fd;