[svn:mod_parrot] r305 - mod_parrot/trunk/src

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Wed Jan  2 11:51:41 2008
New Revision: 305

Modified:
   mod_parrot/trunk/src/context.c
   mod_parrot/trunk/src/mod_parrot.c
   mod_parrot/trunk/src/modparrot_config.c

Log:
fix some cleanup bugs


Modified: mod_parrot/trunk/src/context.c
==============================================================================
--- mod_parrot/trunk/src/context.c	(original)
+++ mod_parrot/trunk/src/context.c	Wed Jan  2 11:51:41 2008
@@ -62,7 +62,10 @@
 
     /* pop each context off the list and destroy its interpreter */
     while (ctxpp = apr_array_pop(ctx_pool)) {
-        if ((*ctxpp)->interp) modparrot_destroy_interpreter((*ctxpp)->interp);
+        if ((*ctxpp)->interp && !(*ctxpp)->parent_interp) {
+            modparrot_destroy_interpreter((*ctxpp)->interp);
+            (*ctxpp)->interp = NULL;
+        }
     }
 
     /* apache will take care of destroying the actual context pool array */

Modified: mod_parrot/trunk/src/mod_parrot.c
==============================================================================
--- mod_parrot/trunk/src/mod_parrot.c	(original)
+++ mod_parrot/trunk/src/mod_parrot.c	Wed Jan  2 11:51:41 2008
@@ -187,7 +187,7 @@
      * as we may not handle any other part of the request until then.
      */
     apr_pool_cleanup_register(r->pool, r, modparrot_request_cleanup,
-        modparrot_request_cleanup);
+        apr_pool_cleanup_null);
 
     if (!r->handler) return DECLINED;
 

Modified: mod_parrot/trunk/src/modparrot_config.c
==============================================================================
--- mod_parrot/trunk/src/modparrot_config.c	(original)
+++ mod_parrot/trunk/src/modparrot_config.c	Wed Jan  2 11:51:41 2008
@@ -67,7 +67,7 @@
     cfg->handler_map = apr_table_make(p, 2);
 
     /* destroy context pool on cleanup */
-    apr_pool_cleanup_register(p, s, modparrot_cleanup, modparrot_cleanup);
+    apr_pool_cleanup_register(p, s, modparrot_cleanup, apr_pool_cleanup_null);
 
     /* set default HLL to PIR */
     apr_table_set(cfg->handler_map, MODPARROT_MAGIC, MODPARROT_DEFAULT_HLL);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.