stas        2003/09/23 01:04:42

  Modified:    src/modules/perl mod_perl.c modperl_log.c modperl_log.h
               .        Changes
  Log:
  fix tracing with (PerlTrace/MOD_PERL_TRACE) on win32 (the error_log
  filehandle was invalid after the open_logs phase)
  
  Revision  Changes    Path
  1.186     +10 -0     modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.185
  retrieving revision 1.186
  diff -u -u -r1.185 -r1.186
  --- mod_perl.c        16 Sep 2003 18:47:53 -0000      1.185
  +++ mod_perl.c        23 Sep 2003 08:04:42 -0000      1.186
  @@ -598,6 +598,16 @@
       MP_dSCFG(s);
       dTHXa(scfg->mip->parent->perl);
   #endif
  +
  +#ifdef MP_TRACE
  +    /* httpd core open_logs handler re-opens s->error_log, which might
  +     * change, even though it still points to the same physical file
  +     * (.e.g on win32 the filehandle will be different. Therefore
  +     * reset the tracing logfile setting here, since this is the
  +     * earliest place, happening after the open_logs phase */
  +    modperl_trace_logfile_set(s->error_log);
  +#endif
  +    
       ap_add_version_component(pconf, MP_VERSION_STRING);
       ap_add_version_component(pconf,
                                Perl_form(aTHX_ "Perl/v%vd", PL_patchlevel));
  
  
  
  1.9       +6 -1      modperl-2.0/src/modules/perl/modperl_log.c
  
  Index: modperl_log.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- modperl_log.c     3 Apr 2003 06:25:26 -0000       1.8
  +++ modperl_log.c     23 Sep 2003 08:04:42 -0000      1.9
  @@ -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());
   }
  
  
  
  1.11      +2 -0      modperl-2.0/src/modules/perl/modperl_log.h
  
  Index: modperl_log.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- modperl_log.h     14 Aug 2002 14:54:47 -0000      1.10
  +++ modperl_log.h     23 Sep 2003 08:04:42 -0000      1.11
  @@ -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
  
  
  
  1.219     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.218
  retrieving revision 1.219
  diff -u -u -r1.218 -r1.219
  --- Changes   22 Sep 2003 23:39:49 -0000      1.218
  +++ Changes   23 Sep 2003 08:04:42 -0000      1.219
  @@ -12,6 +12,9 @@
   
   =item 1.99_10-dev
   
  +fix tracing with (PerlTrace/MOD_PERL_TRACE) on win32 (the error_log
  +filehandle was invalid after the open_logs phase) [Stas]
  +
   fix a bug where %ENV vars set via subprocess_env persist across
   requests.  (e.g. a Cookie incoming header which ends up in
   $ENV{HTTP_COOKIE} would persist to the next request which has no
  
  
  

Reply via email to