apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r661063 - in /apr/apr-util/trunk: CHANGES misc/apr_reslist.c
Date Wed, 28 May 2008 19:59:39 GMT
Author: niq
Date: Wed May 28 12:59:38 2008
New Revision: 661063

URL: http://svn.apache.org/viewvc?rev=661063&view=rev
Log:
apr_reslist: destroy all resources in a cleanup (don't stop immediately
on error)
PR 45086


Modified:
    apr/apr-util/trunk/CHANGES
    apr/apr-util/trunk/misc/apr_reslist.c

Modified: apr/apr-util/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/CHANGES?rev=661063&r1=661062&r2=661063&view=diff
==============================================================================
--- apr/apr-util/trunk/CHANGES [utf-8] (original)
+++ apr/apr-util/trunk/CHANGES [utf-8] Wed May 28 12:59:38 2008
@@ -1,14 +1,17 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.4.0
 
-  *) Amend apr_reslist to expire resources whose idle time exceeds ttl.
-     PR 42841 [Tom Donovan, Nick Kew, Ruediger Pluem]
+  *) apr_reslist: destroy all resources in apr_cleanup.
+      PR 45086 [Nick Kew]
 
   *) Add DTrace Probes to Hooks, making it easier to inspect APR Hook based
      applications with DTrace. [Theo Schlossnagle <jesus omniti.com>]
 
 Changes with APR-util 1.3.0
 
+  *) Amend apr_reslist to expire resources whose idle time exceeds ttl.
+     PR 42841 [Tom Donovan, Nick Kew, Ruediger Pluem]
+
   *) Modularize ldap's stub with the dbd dso modular structure, and teach
      the apu dso's to respect the system specific shared lib path var.
      To link to an application without ldap libs, query 

Modified: apr/apr-util/trunk/misc/apr_reslist.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/misc/apr_reslist.c?rev=661063&r1=661062&r2=661063&view=diff
==============================================================================
--- apr/apr-util/trunk/misc/apr_reslist.c (original)
+++ apr/apr-util/trunk/misc/apr_reslist.c Wed May 28 12:59:38 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;
 }
 
 /**



Mime
View raw message