I was wondering why modperl_run_filter_init() uses MP_dINTERP_SELECT to select the interpreter, but never puts the interpreter back into the pool. what happens to the remaining phases if PerlInterpScope is handler?




must be a bug then.



ok, I'll get a patch together for it.


cool, thanks.

attached.


--Geoff
Index: src/modules/perl/modperl_callback.c
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_callback.c,v
retrieving revision 1.56
diff -u -r1.56 modperl_callback.c
--- src/modules/perl/modperl_callback.c 19 Aug 2003 05:01:22 -0000      1.56
+++ src/modules/perl/modperl_callback.c 13 Sep 2003 15:10:12 -0000
@@ -249,10 +249,7 @@
     SvREFCNT_dec((SV*)av_args);
 
 #ifdef USE_ITHREADS
-    if (interp && MpInterpPUTBACK(interp)) {
-        /* PerlInterpScope handler */
-        modperl_interp_unselect(interp);
-    }
+    MP_dINTERP_PUTBACK(interp);
 #endif
 
     return status;
Index: src/modules/perl/modperl_filter.c
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_filter.c,v
retrieving revision 1.66
diff -u -r1.66 modperl_filter.c
--- src/modules/perl/modperl_filter.c   20 Aug 2003 23:10:09 -0000      1.66
+++ src/modules/perl/modperl_filter.c   13 Sep 2003 15:10:12 -0000
@@ -359,6 +359,8 @@
 
     SvREFCNT_dec((SV*)args);
 
+    MP_dINTERP_PUTBACK(interp);
+
     MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT
                "return: %d\n", handler->name, status);
     
@@ -428,6 +430,8 @@
     else {
         MP_FAILURE_CROAK(modperl_output_filter_flush(filter));
     }
+
+    MP_dINTERP_PUTBACK(interp);
 
     MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT
                "return: %d\n", handler->name, status);
Index: src/modules/perl/modperl_interp.h
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_interp.h,v
retrieving revision 1.18
diff -u -r1.18 modperl_interp.h
--- src/modules/perl/modperl_interp.h   27 Aug 2002 01:43:25 -0000      1.18
+++ src/modules/perl/modperl_interp.h   13 Sep 2003 15:10:12 -0000
@@ -50,6 +50,11 @@
     interp = modperl_interp_select(r, c, s); \
     aTHX = interp->perl
 
+#define MP_dINTERP_PUTBACK(interp) \
+    if (interp && MpInterpPUTBACK(interp)) { \
+        modperl_interp_unselect(interp); \
+    }
+
 #define MP_aTHX aTHX
 
 apr_status_t modperl_interp_pool_destroy(void *data);
@@ -71,6 +76,8 @@
 #else
 
 #define MP_dINTERP_SELECT(r, c, s) dNOOP
+
+#define MP_dINTERP_PUTBACK(interp) dNOOP
 
 #define MP_aTHX 0
 

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

Reply via email to