Stas Bekman wrote:

It was a proof of concept hack, so it doesn't matter where you put it, it't not the way to go since you don't want to call modperl_global_get_server_rec() on each trace, even while debugging.

Please try this patch (of course first reverting the previous attempt ;)

Yup - your "real" patch (below) also fixes the tarcing problem for me.


- Steve



Index: src/modules/perl/mod_perl.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.185
diff -u -r1.185 mod_perl.c
--- src/modules/perl/mod_perl.c 16 Sep 2003 18:47:53 -0000 1.185
+++ src/modules/perl/mod_perl.c 23 Sep 2003 00:57:24 -0000
@@ -598,6 +598,12 @@
MP_dSCFG(s);
dTHXa(scfg->mip->parent->perl);
#endif
+
+ /* httpd core open_logs handler re-opens s->error_log, which
+ * might get a different value on OSes which don't talk
+ * filedescriptors, reset the logfile */
+ modperl_trace_logfile_set(s->error_log);
+
ap_add_version_component(pconf, MP_VERSION_STRING);
ap_add_version_component(pconf,
Perl_form(aTHX_ "Perl/v%vd", PL_patchlevel));
Index: src/modules/perl/modperl_log.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.c,v
retrieving revision 1.8
diff -u -r1.8 modperl_log.c
--- src/modules/perl/modperl_log.c 3 Apr 2003 06:25:26 -0000 1.8
+++ src/modules/perl/modperl_log.c 23 Sep 2003 00:57:24 -0000
@@ -19,6 +19,11 @@
return debug_level;
}


+void modperl_trace_logfile_set(apr_file_t *logfile_new)
+{
+    logfile = logfile_new;
+}
+
 void modperl_trace(const char *func, const char *fmt, ...)
 {
     char vstr[8192];
@@ -67,7 +72,7 @@

debug_level |= 0x80000000;

-    logfile = s->error_log; /* XXX */
+    modperl_trace_logfile_set(s->error_log);

     MP_TRACE_a_do(MP_TRACE_dump_flags());
 }
Index: src/modules/perl/modperl_log.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.h,v
retrieving revision 1.10
diff -u -r1.10 modperl_log.h
--- src/modules/perl/modperl_log.h    14 Aug 2002 14:54:47 -0000    1.10
+++ src/modules/perl/modperl_log.h    23 Sep 2003 00:57:24 -0000
@@ -26,6 +26,8 @@
 #define MP_TIDF \
 (unsigned long)modperl_thread_self()

+void modperl_trace_logfile_set(apr_file_t *logfile_new);
+
 unsigned long modperl_debug_level(void);

#ifdef WIN32




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



Reply via email to