> wrowe 01/07/23 15:19:13
>
> Modified: include apr_pools.h
> include/arch/unix inherit.h
> memory/unix apr_pools.c
> Log:
> Depricated the broken apr_pool_child_cleanup_kill, and added the new
> apr_pool_child_cleanup_set() to replace the registered child cleanup
> with another cleanup fn. Fixed the inherit macro declarations to never
> register a NULL cleanup fn.
Sorry. Here's the net, correct patch applied to apr_pools.c;
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
retrieving revision 1.101
retrieving revision 1.103
diff -u -r1.101 -r1.103
--- apr_pools.c 2001/07/14 22:31:38 1.101
+++ apr_pools.c 2001/07/23 22:38:36 1.103
@@ -738,23 +738,21 @@
}
}
-APR_DECLARE(void) apr_pool_child_cleanup_kill(apr_pool_t *p, const void *data,
- apr_status_t (*cleanup) (void *))
+APR_DECLARE(void) apr_pool_child_cleanup_set(apr_pool_t *p, const void *data,
+ apr_status_t (*plain_cleanup) (void *),
+ apr_status_t (*child_cleanup) (void *))
{
struct cleanup *c;
- struct cleanup **lastp;
if (p == NULL)
return;
c = p->cleanups;
- lastp = &p->cleanups;
while (c) {
- if (c->data == data && c->child_cleanup == cleanup) {
- *lastp = c->next;
+ if (c->data == data && c->plain_cleanup == plain_cleanup) {
+ c->child_cleanup == child_cleanup;
break;
}
- lastp = &c->next;
c = c->next;
}
}