If non-threaded mpms don't use tipools in mips, why creating and destroying them? The following patch "fixes" that.

Index: src/modules/perl/modperl_interp.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
retrieving revision 1.54
diff -u -r1.54 modperl_interp.c
--- src/modules/perl/modperl_interp.c   23 Nov 2002 23:25:32 -0000      1.54
+++ src/modules/perl/modperl_interp.c   1 Mar 2003 06:30:07 -0000
@@ -168,9 +168,11 @@
 {
     modperl_interp_pool_t *mip = (modperl_interp_pool_t *)data;

-    modperl_tipool_destroy(mip->tipool);
-    mip->tipool = NULL;
-
+    if (mip->tipool) {
+        modperl_tipool_destroy(mip->tipool);
+        mip->tipool = NULL;
+    }
+
     if (MpInterpBASE(mip->parent)) {
         /* multiple mips might share the same parent
          * make sure its only destroyed once
@@ -227,12 +229,12 @@
     modperl_interp_pool_t *mip =
         (modperl_interp_pool_t *)apr_pcalloc(p, sizeof(*mip));

-    modperl_tipool_t *tipool =
-        modperl_tipool_new(p, scfg->interp_pool_cfg,
-                           &interp_pool_func, mip);
-
-    mip->tipool = tipool;
-    mip->server  = s;
+    if (scfg->threaded_mpm) {
+        mip->tipool = modperl_tipool_new(p, scfg->interp_pool_cfg,
+                                         &interp_pool_func, mip);
+    }
+
+    mip->server = s;
     mip->parent = modperl_interp_new(mip, NULL);
     aTHX = mip->parent->perl = perl;

@@ -496,7 +498,7 @@
                              modperl_interp_mip_walker_t walker,
                              void *data)
 {
-    modperl_list_t *head = mip->tipool->idle;
+    modperl_list_t *head = mip->tipool ? mip->tipool->idle : NULL;

     if (!current_perl) {
         current_perl = PERL_GET_CONTEXT;


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to