You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/04/03 07:23:47 UTC

cvs commit: modperl-2.0/src/modules/perl modperl_callback.c

dougm       01/04/02 22:23:47

  Modified:    src/modules/perl modperl_callback.c
  Log:
  if handler is resolved at request time and not duped (prefork-mpm case), need to use s->process->pconf pool
  
  Revision  Changes    Path
  1.37      +12 -2     modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- modperl_callback.c	2001/03/17 06:03:37	1.36
  +++ modperl_callback.c	2001/04/03 05:23:47	1.37
  @@ -6,7 +6,7 @@
       CV *cv=Nullcv;
       I32 flags = G_EVAL|G_SCALAR;
       dSP;
  -    int count, status;
  +    int count, status, duped=0;
   
   #ifdef USE_ITHREADS
       if (p && !MpHandlerPARSED(handler) && !MpHandlerDYNAMIC(handler)) {
  @@ -17,6 +17,7 @@
                * locking, so just copy it
                */
               handler = modperl_handler_dup(p, handler);
  +            duped = 1;
           }
       }
   #endif
  @@ -24,8 +25,17 @@
       MP_TRACE_h_do(MpHandler_dump_flags(handler, handler->name));
   
       if (!MpHandlerPARSED(handler)) {
  +        apr_pool_t *rp = duped ? p : s->process->pconf;
           MpHandlerAUTOLOAD_On(handler);
  -        if (!modperl_mgv_resolve(aTHX_ handler, p, handler->name)) {
  +
  +        MP_TRACE_h(MP_FUNC,
  +                   "handler %s was not compiled at startup, "
  +                   "attempting to resolve using %s pool 0x%lx\n",
  +                   handler->name,
  +                   duped ? "current" : "server conf",
  +                   (unsigned long)rp);
  +
  +        if (!modperl_mgv_resolve(aTHX_ handler, rp, handler->name)) {
               MP_TRACE_h(MP_FUNC, "failed to resolve handler `%s'\n",
                          handler->name);
               return HTTP_INTERNAL_SERVER_ERROR;