diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2004-02-02 21:39:11 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2004-02-02 21:39:11 +0000 |
commit | e3421172d987b69678178e9ab678c3b21681ddb4 (patch) | |
tree | 9723b708fb2bed2ebc02ec387934f6f8e4f6a1bb | |
parent | 0330485c8c24e3ffc407027ebc062dd90b3531ec (diff) | |
download | libapr-e3421172d987b69678178e9ab678c3b21681ddb4.tar.gz |
Move the NetWare memory pool cleanup code outside of the APR_POOL_DEBUG #if so that the clean up will happen regardless of the debugging mode.
Submitted by: Jean-Jacques Clar [jjclar@novell.com]
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64889 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | memory/unix/apr_pools.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c index e5e886611..cc190a900 100644 --- a/memory/unix/apr_pools.c +++ b/memory/unix/apr_pools.c @@ -596,24 +596,6 @@ APR_DECLARE(void) apr_pool_terminate(void) global_allocator = NULL; } -#ifdef NETWARE -void netware_pool_proc_cleanup () -{ - apr_pool_t *pool = global_pool->child; - apr_os_proc_t owner_proc = (apr_os_proc_t)getnlmhandle(); - - while (pool) { - if (pool->owner_proc == owner_proc) { - apr_pool_destroy (pool); - pool = global_pool->child; - } - else { - pool = pool->sibling; - } - } - return; -} -#endif /* defined(NETWARE) */ /* Node list management helper macros; list_insert() inserts 'node' * before 'point'. */ @@ -1566,6 +1548,10 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex_debug(apr_pool_t **newpool, #if APR_HAS_THREADS pool->owner = apr_os_thread_current(); #endif /* APR_HAS_THREADS */ +#ifdef NETWARE + pool->owner_proc = (apr_os_proc_t)getnlmhandle(); +#endif /* defined(NETWARE) */ + if (parent == NULL || parent->allocator != allocator) { #if APR_HAS_THREADS @@ -1759,6 +1745,25 @@ APR_DECLARE(void) apr_pool_lock(apr_pool_t *pool, int flag) #endif /* !APR_POOL_DEBUG */ +#ifdef NETWARE +void netware_pool_proc_cleanup () +{ + apr_pool_t *pool = global_pool->child; + apr_os_proc_t owner_proc = (apr_os_proc_t)getnlmhandle(); + + while (pool) { + if (pool->owner_proc == owner_proc) { + apr_pool_destroy (pool); + pool = global_pool->child; + } + else { + pool = pool->sibling; + } + } + return; +} +#endif /* defined(NETWARE) */ + /* * "Print" functions (common) |