Two things are amusing about that: 1) It compiles 2) That I wrote it in the first place. I guess there is such a thing as too much perl :-)diff mod_perl-1.27/src/modules/perl/mod_perl.c mod_perl.c 1113a1114,1123 > # Clear out any sub requests that may have occurred too.
Here is a better patch of the same fix taken off of cvs that also goes down the next() and prev() chain until their ends. Sorry for the piles of mail,
John
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.145
diff -u -r1.145 mod_perl.c
--- src/modules/perl/mod_perl.c 23 May 2002 04:35:16 -0000 1.145
+++ src/modules/perl/mod_perl.c 5 Jan 2003 19:40:40 -0000
@@ -1096,12 +1096,8 @@
#endif
-static void per_request_cleanup(request_rec *r)
+static void pnotes_cleanup(perl_request_config *cfg)
{
- dPPREQ;
- perl_request_sigsave **sigs;
- int i;
-
if(!cfg) {
return;
}
@@ -1110,11 +1106,34 @@
SvREFCNT_dec(cfg->pnotes);
cfg->pnotes = Nullhv;
}
+}
+
+static void per_request_cleanup(request_rec *r)
+{
+ dPPREQ;
+ perl_request_sigsave **sigs;
+ int i;
+ request_rec *iterator;
+
+ pnotes_cleanup(cfg);
+
+ /* Clear out any sub or parent requests that may have occurred too. */
+ iterator = r;
+ while (iterator = iterator->next) {
+ perl_request_config *sub_cfg = (perl_request_config *)get_module_config(iterator->request_config, &perl_module);
+ pnotes_cleanup(sub_cfg);
+ }
+
+ iterator = r;
+ if (iterator = iterator->prev) {
+ perl_request_config *sub_cfg = (perl_request_config *)get_module_config(r->request_config, &perl_module);
+ pnotes_cleanup(sub_cfg);
+ }
#ifndef WIN32
sigs = (perl_request_sigsave **)cfg->sigsave->elts;
for (i=0; i < cfg->sigsave->nelts; i++) {
- MP_TRACE_g(fprintf(stderr,
+ MP_TRACE_g(fprintf(stderr,
"mod_perl: restoring SIG%s (%d) handler from: 0x%lx to: 0x%lx\n",
my_signame(sigs[i]->signo), (int)sigs[i]->signo,
(unsigned long)rsignal_state(sigs[i]->signo),
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
