diff options
author | niq <niq@13f79535-47bb-0310-9956-ffa450edef68> | 2008-05-28 19:59:38 +0000 |
---|---|---|
committer | niq <niq@13f79535-47bb-0310-9956-ffa450edef68> | 2008-05-28 19:59:38 +0000 |
commit | 5a459d2a470acc7b11660df9f83b5fcf13c4e172 (patch) | |
tree | 6b4d0bc3318afb3f29624fb71ccdb0465a86476a | |
parent | c329f7cfb6cd47b499640ac5d22708936746e133 (diff) | |
download | libapr-util-5a459d2a470acc7b11660df9f83b5fcf13c4e172.tar.gz |
apr_reslist: destroy all resources in a cleanup (don't stop immediately
on error)
PR 45086
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@661063 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | misc/apr_reslist.c | 12 |
2 files changed, 12 insertions, 7 deletions
@@ -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 diff --git a/misc/apr_reslist.c b/misc/apr_reslist.c index 46087bb4..14b7e6c4 100644 --- a/misc/apr_reslist.c +++ b/misc/apr_reslist.c @@ -137,18 +137,20 @@ static apr_status_t destroy_resource(apr_reslist_t *reslist, apr_res_t *res) 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 @@ static apr_status_t reslist_cleanup(void *data_) apr_thread_mutex_destroy(rl->listlock); apr_thread_cond_destroy(rl->avail); - return APR_SUCCESS; + return rv; } /** |