perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_interp.c
Date Wed, 14 Mar 2001 06:57:44 GMT
dougm       01/03/13 22:57:44

  Modified:    src/modules/perl modperl_interp.c
  Log:
  share selected Perl interpreter across sub-requests by default
  
  Revision  Changes    Path
  1.21      +10 -5     modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- modperl_interp.c	2001/03/14 05:22:49	1.20
  +++ modperl_interp.c	2001/03/14 06:57:43	1.21
  @@ -202,12 +202,14 @@
    */
   #define MP_INTERP_KEY "MODPERL_INTERP"
   
  -modperl_interp_t *modperl_interp_select(request_rec *r, conn_rec *c,
  +modperl_interp_t *modperl_interp_select(request_rec *rr, conn_rec *c,
                                           server_rec *s)
   {
       MP_dSCFG(s);
       modperl_interp_t *interp;
       apr_pool_t *p = NULL;
  +    int is_subrequest = (rr && rr->main) ? 1 : 0;
  +    request_rec *r = is_subrequest ? rr->main : rr;
       const char *desc = NULL;
       int lifetime_connection = 
           (modperl_interp_lifetime_connection(scfg) || !r);
  @@ -231,8 +233,9 @@
   
           if (interp) {
               MP_TRACE_i(MP_FUNC,
  -                       "found interp 0x%lx in %s 0x%lx\n",
  -                       (unsigned long)interp, desc, (unsigned long)r->pool);
  +                       "found interp 0x%lx in %s 0x%lx (%s request for %s)\n",
  +                       (unsigned long)interp, desc, (unsigned long)r->pool,
  +                       (is_subrequest ? "sub" : "main"), rr->uri);
               return interp;
           }
   
  @@ -267,8 +270,10 @@
       /* set context (THX) for this thread */
       PERL_SET_CONTEXT(interp->perl);
   
  -    MP_TRACE_i(MP_FUNC, "set interp 0x%lx in %s 0x%lx\n",
  -               (unsigned long)interp, desc, (unsigned long)p);
  +    MP_TRACE_i(MP_FUNC, "set interp 0x%lx in %s 0x%lx (%s request for %s)\n",
  +               (unsigned long)interp, desc, (unsigned long)p,
  +               (r ? (is_subrequest ? "sub" : "main") : "conn"),
  +               (r ? rr->uri : c->remote_ip));
   
       return interp;
   }
  
  
  

Mime
View raw message