dougm       01/03/14 22:12:14

  Modified:    src/modules/perl modperl_mgv.c
  Log:
  duh, ap_pcw_walk_config already iterates over all servers,
  so deal with module reloading for VirtualHosts with 'PerlOptions +Parent'
  inside modperl_hash_handlers()
  
  Revision  Changes    Path
  1.4       +3 -19     modperl-2.0/src/modules/perl/modperl_mgv.c
  
  Index: modperl_mgv.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- modperl_mgv.c     2001/03/15 05:39:07     1.3
  +++ modperl_mgv.c     2001/03/15 06:12:14     1.4
  @@ -330,7 +330,7 @@
   
   /* precompute the hash(es) for handler names */
   static void modperl_hash_handlers(pTHX_ apr_pool_t *p, server_rec *s,
  -                                  MpAV *entry, void *reload)
  +                                  MpAV *entry, void *data)
   {
       MP_dSCFG(s);
       int i;
  @@ -347,7 +347,8 @@
   
           if (MpHandlerPARSED(handler)) {
   #ifdef USE_ITHREADS
  -            if (reload && !modperl_mgv_lookup(aTHX_ handler->mgv_cv)) {
  +            if ((MpSrvPARENT(scfg) && MpSrvAUTOLOAD(scfg))
  +                && !modperl_mgv_lookup(aTHX_ handler->mgv_cv)) {
                   /* 
                    * this VirtualHost has its own parent interpreter
                    * must require the module again with this server's THX
  @@ -425,21 +426,4 @@
       ap_pcw_walk_config(p, s, &perl_module, NULL,
                          modperl_dw_hash_handlers,
                          modperl_sw_hash_handlers);
  -
  -#ifdef USE_ITHREADS
  -    /* check for parent interpreters in virtual hosts who need modules
  -     * loaded in their own namespace
  -     */
  -    for (s=s->next; s; s=s->next) {
  -        MP_dSCFG(s);
  -
  -        if (!MpSrvPARENT(scfg) || !MpSrvAUTOLOAD(scfg)) {
  -            continue;
  -        }
  -
  -        ap_pcw_walk_config(p, s, &perl_module, (void*)TRUE,
  -                           modperl_dw_hash_handlers,
  -                           modperl_sw_hash_handlers);
  -    }
  -#endif
   }
  
  
  

Reply via email to