Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 45074 invoked from network); 28 May 2008 21:45:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2008 21:45:35 -0000 Received: (qmail 97799 invoked by uid 500); 28 May 2008 21:45:37 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 97760 invoked by uid 500); 28 May 2008 21:45:37 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 97751 invoked by uid 99); 28 May 2008 21:45:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 14:45:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 21:44:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 674EE23889F7; Wed, 28 May 2008 14:45:14 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r661102 - in /apr/apr-util/branches/1.3.x: CHANGES misc/apr_reslist.c Date: Wed, 28 May 2008 21:45:14 -0000 To: commits@apr.apache.org From: niq@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080528214514.674EE23889F7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: niq Date: Wed May 28 14:45:13 2008 New Revision: 661102 URL: http://svn.apache.org/viewvc?rev=661102&view=rev Log: Backport r661063 - fix apr_reslist cleanup Folks on IRC want this backported in time for 1.3.0 roll. Modified: apr/apr-util/branches/1.3.x/CHANGES apr/apr-util/branches/1.3.x/misc/apr_reslist.c Modified: apr/apr-util/branches/1.3.x/CHANGES URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/CHANGES?rev=661102&r1=661101&r2=661102&view=diff ============================================================================== --- apr/apr-util/branches/1.3.x/CHANGES [utf-8] (original) +++ apr/apr-util/branches/1.3.x/CHANGES [utf-8] Wed May 28 14:45:13 2008 @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with APR-util 1.3.0 + *) apr_reslist: destroy all resources in apr_cleanup (don't give up on error). + PR 45086 [Nick Kew] + *) Add apr_brigade_split_ex for reusing existing brigades in situation where brigades need to be split often during the lifetime of a pool. [Ruediger Pluem] Modified: apr/apr-util/branches/1.3.x/misc/apr_reslist.c URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/misc/apr_reslist.c?rev=661102&r1=661101&r2=661102&view=diff ============================================================================== --- apr/apr-util/branches/1.3.x/misc/apr_reslist.c (original) +++ apr/apr-util/branches/1.3.x/misc/apr_reslist.c Wed May 28 14:45:13 2008 @@ -137,18 +137,20 @@ static apr_status_t reslist_cleanup(void *data_) { - apr_status_t rv; + apr_status_t rv = APR_SUCCESS; apr_reslist_t *rl = data_; apr_res_t *res; apr_thread_mutex_lock(rl->listlock); while (rl->nidle > 0) { + apr_status_t rv1; res = pop_resource(rl); rl->ntotal--; - rv = destroy_resource(rl, res); - if (rv != APR_SUCCESS) { - return rv; + rv1 = destroy_resource(rl, res); + if (rv1 != APR_SUCCESS) { + rv = rv1; /* loses info in the unlikely event of + * multiple *different* failures */ } free_container(rl, res); } @@ -159,7 +161,7 @@ apr_thread_mutex_destroy(rl->listlock); apr_thread_cond_destroy(rl->avail); - return APR_SUCCESS; + return rv; } /**