costin      2002/05/31 15:27:17

  Modified:    jk/native2/common jk_worker_status.c
               jk/native2/include jk_uriEnv.h
               jk/native2/server/apache2 mod_jk2.c
  Log:
  Remove debug.
  
  Fix a bug in merging the uriEnvs ( if <Location> is used ) and avoid
  duplicating the merge.
  
  Revision  Changes    Path
  1.28      +0 -2      jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c
  
  Index: jk_worker_status.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- jk_worker_status.c        31 May 2002 18:21:00 -0000      1.27
  +++ jk_worker_status.c        31 May 2002 22:27:16 -0000      1.28
  @@ -339,8 +339,6 @@
                   stat->totalTime=0;
                   stat->maxTime=0;
   #endif
  -                env->l->jkLog(env, env->l, JK_LOG_INFO, "reset() %s %p %p %p %d %d 
%d %d\n",
  -                              JK_CHECK_NULL(slot->name), data, statArray, stat, i, 
j, stat->reqCnt, stat->errCnt );
               }
           }
       }
  
  
  
  1.15      +1 -0      jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h
  
  Index: jk_uriEnv.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_uriEnv.h       15 May 2002 19:32:42 -0000      1.14
  +++ jk_uriEnv.h       31 May 2002 22:27:17 -0000      1.15
  @@ -207,6 +207,7 @@
       int envvars_in_use;
       struct jk_map *envvars;
   
  +    int merged;
       /** XXX .
        */
   /*     int status; */
  
  
  
  1.30      +36 -18    jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_jk2.c 31 May 2002 18:29:48 -0000      1.29
  +++ mod_jk2.c 31 May 2002 22:27:17 -0000      1.30
  @@ -59,7 +59,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    *                 Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.29 $                                           *
  + * Version:     $Revision: 1.30 $                                           *
    ***************************************************************************/
   
   /*
  @@ -233,19 +233,45 @@
   }
   
   
  -static void *jk2_merge_dir_config(apr_pool_t *p, void *basev, void *addv)
  +static void *jk2_merge_dir_config(apr_pool_t *p, void *childv, void *parentv)
   {
  -    jk_uriEnv_t *base =(jk_uriEnv_t *)basev;
  -    jk_uriEnv_t *add = (jk_uriEnv_t *)addv; 
  -    jk_uriEnv_t *new = (jk_uriEnv_t *)apr_pcalloc(p,sizeof(jk_uriEnv_t));
  -    
  +    jk_uriEnv_t *child =(jk_uriEnv_t *)childv;
  +    jk_uriEnv_t *parent = (jk_uriEnv_t *)parentv; 
  +
  +    if( child->merged != JK_TRUE ) {
  +        /* Merge options from parent. 
  +         */
  +        if( parent->mbean->debug > 0 ) /* Inherit debugging */
  +            child->mbean->debug = parent->mbean->debug;
  +
  +        if( child->workerName==NULL ) {
  +            child->workerName=parent->workerName;
  +            child->worker=parent->worker;
  +        }
  +        if( child->virtual==NULL ) {
  +            child->virtual=parent->virtual;
  +            child->aliases=parent->aliases;
  +        }
  +        if( child->contextPath==NULL ) {
  +            child->contextPath=parent->contextPath;
  +            child->ctxt_len=parent->ctxt_len;
  +        }
  +        /* XXX Shuld we merge env vars ?
  +         */
  +        
  +        /* When we merged to top - mark and stop duplicating the work
  +         */
  +        if( parent->uri == NULL ) 
  +            child->merged=JK_TRUE;
       
  -    if( base->mbean->debug > 0 ) {
  -        fprintf(stderr, "mod_jk2:mergeDirConfig() Merged dir config %p %p %s %s\n",
  -                base, new, base->uri, add->uri);
  +        
  +        if( child->mbean->debug > -1 ) {
  +            fprintf(stderr, "mod_jk2:mergeDirConfig() Merged dir config %p %s %s %s 
%s\n",
  +                    child, child->uri, parent->uri, child->workerName, 
parent->workerName);
  +        }
       }
   
  -    return add;
  +    return childv;
   }
   
   /** Basic initialization for jk2.
  @@ -571,8 +597,6 @@
                         "mod_jk.handler() serving %s with %p %p %s\n",
                         uriEnv->mbean->localName, worker, worker->mbean, 
worker->mbean->localName );
   
  -    fprintf( stderr, "XXX 1 %p %p\n", worker, worker->rPoolCache );
  -
       /* Get a pool for the request XXX move it in workerEnv to
          be shared with other server adapters */
       rPool= worker->rPoolCache->get( env, worker->rPoolCache );
  @@ -583,17 +607,11 @@
                             "mod_jk.handler(): new rpool %p\n", rPool );
       }
       
  -    fprintf( stderr, "XXX 2 %p\n", worker );
  -    
       s=(jk_ws_service_t *)rPool->calloc( env, rPool, sizeof( jk_ws_service_t ));
       
  -    fprintf( stderr, "XXX 2 %p\n", s );
  -
       /* XXX we should reuse the request itself !!! */
       jk2_service_apache2_init( env, s );
       
  -    fprintf( stderr, "XXX 3 %p %p\n", s, worker );
  -
       s->pool = rPool;
       s->init( env, s, worker, r );
       
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to