Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 4605 invoked by uid 500); 24 Feb 2003 12:41:16 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 4592 invoked from network); 24 Feb 2003 12:41:15 -0000 Message-ID: <3E5A130F.6010709@attglobal.net> Date: Mon, 24 Feb 2003 07:41:51 -0500 From: Jeff Trawick Reply-To: trawick@attglobal.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [patch] resolving segfaults when ap_run_pre_connection() fails. References: <3E518943.4080406@stason.org> In-Reply-To: <3E518943.4080406@stason.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Stas Bekman wrote: > Index: server/connection.c > =================================================================== > RCS file: /home/cvspublic/httpd-2.0/server/connection.c,v > retrieving revision 1.106 > diff -u -r1.106 connection.c > --- server/connection.c 15 Jul 2002 08:05:10 -0000 1.106 > +++ server/connection.c 18 Feb 2003 01:11:38 -0000 > @@ -199,11 +199,12 @@ > > AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd) > { > + apr_status_t rc; > ap_update_vhost_given_ip(c); > > - ap_run_pre_connection(c, csd); > - > - if (!c->aborted) { > + rc = ap_run_pre_connection(c, csd); > + > + if ((rc == OK || rc == DONE) && !c->aborted) { > ap_run_process_connection(c); maybe patch should set c->aborted if some pre_connection hook fails, in case some other code wants to look at that? rc = ap_run_pre_connection() if (rc != OK && rc != DONE) { c->aborted = 1; } if (!c->aborted) { ap_run_process_connection() }