Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 74650 invoked by uid 500); 13 Mar 2002 03:00:24 -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 74639 invoked by uid 500); 13 Mar 2002 03:00:23 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 13 Mar 2002 03:00:22 -0000 Message-ID: <20020313030022.23423.qmail@icarus.apache.org> From: stoddard@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/experimental mod_mem_cache.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N stoddard 02/03/12 19:00:22 Modified: modules/experimental mod_mem_cache.c Log: A bit more cleanup Revision Changes Path 1.35 +4 -7 httpd-2.0/modules/experimental/mod_mem_cache.c Index: mod_mem_cache.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- mod_mem_cache.c 12 Mar 2002 22:26:07 -0000 1.34 +++ mod_mem_cache.c 13 Mar 2002 03:00:22 -0000 1.35 @@ -223,10 +223,8 @@ for (hi = apr_hash_first(NULL, co->cacheht); hi; hi=apr_hash_next(hi)) { apr_hash_this(hi, NULL, NULL, (void **)&obj); if (obj) { - if (obj->refcount) { - obj->cleanup = 1; - } - else { + obj->cleanup = 1; + if (!obj->refcount) { cleanup_cache_object(obj); } } @@ -390,12 +388,11 @@ } obj = (cache_object_t *) apr_hash_get(sconf->cacheht, key, APR_HASH_KEY_STRING); - if (obj) { - mem_cache_object_t *mobj = (mem_cache_object_t *) obj->vobj; if (obj->complete) { obj->refcount++; - apr_pool_cleanup_register(r->pool, obj, decrement_refcount, apr_pool_cleanup_null); + apr_pool_cleanup_register(r->pool, obj, decrement_refcount, + apr_pool_cleanup_null); } else { obj = NULL;