Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 59329 invoked from network); 23 Nov 2003 00:37:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Nov 2003 00:37:07 -0000 Received: (qmail 30146 invoked by uid 500); 23 Nov 2003 00:36:52 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 30116 invoked by uid 500); 23 Nov 2003 00:36:52 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 30103 invoked by uid 500); 23 Nov 2003 00:36:51 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 30100 invoked from network); 23 Nov 2003 00:36:51 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 23 Nov 2003 00:36:51 -0000 Received: (qmail 59316 invoked by uid 1121); 23 Nov 2003 00:37:06 -0000 Date: 23 Nov 2003 00:37:06 -0000 Message-ID: <20031123003706.59315.qmail@minotaur.apache.org> From: trawick@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/filters mod_ext_filter.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N trawick 2003/11/22 16:37:06 Modified: modules/filters mod_ext_filter.c Log: switch to new pollset api Revision Changes Path 1.9 +17 -12 httpd-2.0/modules/filters/mod_ext_filter.c Index: mod_ext_filter.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/filters/mod_ext_filter.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_ext_filter.c 16 Nov 2003 02:09:13 -0000 1.8 +++ mod_ext_filter.c 23 Nov 2003 00:37:05 -0000 1.9 @@ -110,7 +110,7 @@ ef_filter_t *filter; int noop; #if APR_FILES_AS_SOCKETS - apr_pollfd_t *pollset; + apr_pollset_t *pollset; #endif } ef_ctx_t; @@ -531,17 +531,21 @@ #if APR_FILES_AS_SOCKETS { - apr_socket_t *newsock; + apr_pollfd_t pfd = { 0 }; - rc = apr_poll_setup(&ctx->pollset, 2, ctx->p); + rc = apr_pollset_create(&ctx->pollset, 2, ctx->p, 0); ap_assert(rc == APR_SUCCESS); - rc = apr_socket_from_file(&newsock, ctx->proc->in); - ap_assert(rc == APR_SUCCESS); - rc = apr_poll_socket_add(ctx->pollset, newsock, APR_POLLOUT); - ap_assert(rc == APR_SUCCESS); - rc = apr_socket_from_file(&newsock, ctx->proc->out); + + pfd.p = ctx->p; + pfd.desc_type = APR_POLL_FILE; + pfd.reqevents = APR_POLLOUT; + pfd.desc.f = ctx->proc->in; + rc = apr_pollset_add(ctx->pollset, &pfd); ap_assert(rc == APR_SUCCESS); - rc = apr_poll_socket_add(ctx->pollset, newsock, APR_POLLIN); + + pfd.reqevents = APR_POLLIN; + pfd.desc.f = ctx->proc->out; + rc = apr_pollset_add(ctx->pollset, &pfd); ap_assert(rc == APR_SUCCESS); } #endif @@ -736,12 +740,13 @@ if (APR_STATUS_IS_EAGAIN(rv)) { #if APR_FILES_AS_SOCKETS int num_events; + const apr_pollfd_t *pdesc; - rv = apr_poll(ctx->pollset, 2, - &num_events, f->r->server->timeout); + rv = apr_pollset_poll(ctx->pollset, f->r->server->timeout, + &num_events, &pdesc); if (rv || dc->debug >= DBGLVL_GORY) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, - rv, f->r, "apr_poll()"); + rv, f->r, "apr_pollset_poll()"); } if (rv != APR_SUCCESS && !APR_STATUS_IS_EINTR(rv)) { /* some error such as APR_TIMEUP */