dougm       2002/08/25 16:04:55

  Modified:    src/modules/perl modperl_cmd.c
  Log:
  need to use scfg->mip->parent->perl rather than modperl_interp_select()
  to handle Perl{Require,Module} and <Perl> when mod_perl is already running.
  
  Revision  Changes    Path
  1.25      +11 -6     modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- modperl_cmd.c     24 Aug 2002 18:43:47 -0000      1.24
  +++ modperl_cmd.c     25 Aug 2002 23:04:55 -0000      1.25
  @@ -64,8 +64,10 @@
       MP_dSCFG(parms->server);
   
       if (modperl_is_running()) {
  -        MP_dINTERP_SELECT(NULL, NULL, parms->server);
  -
  +#ifdef USE_ITHREADS
  +        /* XXX: .htaccess support cannot use this perl with threaded MPMs */
  +        dTHXa(scfg->mip->parent->perl);
  +#endif
           MP_TRACE_d(MP_FUNC, "load PerlModule %s\n", arg);
   
           if (!modperl_require_module(aTHX_ arg, FALSE)) {
  @@ -85,7 +87,10 @@
       MP_dSCFG(parms->server);
   
       if (modperl_is_running()) {
  -        MP_dINTERP_SELECT(NULL, NULL, parms->server);
  +#ifdef USE_ITHREADS
  +        /* XXX: .htaccess support cannot use this perl with threaded MPMs */
  +        dTHXa(scfg->mip->parent->perl);
  +#endif
   
           MP_TRACE_d(MP_FUNC, "load PerlRequire %s\n", arg);
   
  @@ -247,8 +252,8 @@
       SV **handler_name;
       int status = OK;
   #ifdef USE_ITHREADS
  +    MP_dSCFG(s);
       pTHX;
  -    modperl_interp_t *interp;
   #endif
   
       if (endp == NULL) {
  @@ -259,8 +264,8 @@
       modperl_run(p, s);
   
   #ifdef USE_ITHREADS
  -    interp = modperl_interp_select(NULL, NULL, s);
  -    aTHX = interp->perl;
  +    /* XXX: .htaccess support cannot use this perl with threaded MPMs */
  +    aTHX = scfg->mip->parent->perl;
   #endif
   
       arg = apr_pstrndup(p, arg, endp - arg);
  
  
  


Reply via email to