costin      02/05/14 13:44:22

  Modified:    jk/native2/server/apache2 jk_apache2.h jk_logger_apache2.c
                        jk_map_aprtable.c mod_jk2.c
  Log:
  Add some support for childId.
  
  Unfortunately in apache2 the information about the child id is not
  available easily. This whole thing will fail if the scoreboard is
  disabled ( but if you disable apache scoreboard you probably have the
  same reasons to disable jk2 scoreboard ).
  
  Also fix some warnings.
  
  Revision  Changes    Path
  1.7       +7 -7      jakarta-tomcat-connectors/jk/native2/server/apache2/jk_apache2.h
  
  Index: jk_apache2.h
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_apache2.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_apache2.h      12 Apr 2002 21:55:05 -0000      1.6
  +++ jk_apache2.h      14 May 2002 20:44:21 -0000      1.7
  @@ -59,7 +59,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           
    *                 Henri Gomez <[EMAIL PROTECTED]>                            
  - * Version:     $Revision: 1.6 $                                           
  + * Version:     $Revision: 1.7 $                                           
    */
   
   #include "jk_global.h"
  @@ -76,14 +76,14 @@
   int jk2_service_apache2_init(jk_env_t *env, jk_ws_service_t *s);
   
   int JK_METHOD jk2_logger_apache2_factory(jk_env_t *env, jk_pool_t *pool,
  -                              jk_bean_t *result, char *type, char *name);
  +                                         jk_bean_t *result, const char *type, const 
char *name);
   
  -int  jk2_pool_apr_factory(jk_env_t *env, jk_pool_t *pool,
  -                          jk_bean_t *result, char *type, char *name);
  +int JK_METHOD jk2_pool_apr_factory(jk_env_t *env, jk_pool_t *pool,
  +                                   jk_bean_t *result, const char *type, const char 
*name);
   
  -int  jk2_map_aprtable_factory(jk_env_t *env, jk_pool_t *pool,
  -                             jk_bean_t *result,
  -                             char *type, char *name);
  +int JK_METHOD jk2_map_aprtable_factory(jk_env_t *env, jk_pool_t *pool,
  +                                       jk_bean_t *result,
  +                                       const char *type, const char *name);
   
   /* Temp. - we should use the factory ( we may need few changes ) */
   int jk2_pool_apr_create( jk_env_t *env, jk_pool_t **newPool, jk_pool_t *parent,
  
  
  
  1.22      +1 -1      
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c
  
  Index: jk_logger_apache2.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_logger_apache2.c       3 May 2002 17:49:53 -0000       1.21
  +++ jk_logger_apache2.c       14 May 2002 20:44:21 -0000      1.22
  @@ -200,7 +200,7 @@
   
   int JK_METHOD 
   jk2_logger_apache2_factory(jk_env_t *env, jk_pool_t *pool, jk_bean_t *result,
  -                              char *type, char *name)
  +                           const char *type, const char *name)
   {
       jk_logger_t *l = (jk_logger_t *)pool->calloc(env, pool,
                                                    sizeof(jk_logger_t));
  
  
  
  1.10      +3 -3      
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c
  
  Index: jk_map_aprtable.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_map_aprtable.c 25 Apr 2002 19:25:11 -0000      1.9
  +++ jk_map_aprtable.c 14 May 2002 20:44:21 -0000      1.10
  @@ -148,9 +148,9 @@
   
   
   /* Not used yet */
  -int  jk2_map_aprtable_factory(jk_env_t *env, jk_pool_t *pool,
  -                              jk_bean_t *result,
  -                              char *type, char *name)
  +int JK_METHOD jk2_map_aprtable_factory(jk_env_t *env, jk_pool_t *pool,
  +                                       jk_bean_t *result,
  +                                       const char *type, const char *name)
   {
       jk_map_t *_this=(jk_map_t *)pool->calloc( env, pool, sizeof(jk_map_t));
   
  
  
  
  1.21      +11 -10    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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_jk2.c 14 May 2002 16:57:37 -0000      1.20
  +++ mod_jk2.c 14 May 2002 20:44:21 -0000      1.21
  @@ -59,7 +59,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    *                 Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.20 $                                           *
  + * Version:     $Revision: 1.21 $                                           *
    ***************************************************************************/
   
   /*
  @@ -371,6 +371,11 @@
   static char * jk2_init(jk_env_t *env, apr_pool_t *pconf,
                          jk_workerEnv_t *workerEnv, server_rec *s )
   {
  +    apr_proc_t proc;
  +    
  +    proc.pid=getpid();
  +    workerEnv->childId=find_child_by_pid( & proc );
  +
       workerEnv->init(env, workerEnv );
       workerEnv->server_name   = (char *)ap_get_server_version();
       ap_add_version_component(pconf, JK_EXPOSED_VERSION);
  @@ -384,7 +389,7 @@
   */
   static int jk2_apache2_isValidating(apr_pool_t *gPool, apr_pool_t **mainPool) {
       apr_pool_t *tmpPool=NULL;
  -    char *data=NULL;
  +    void *data=NULL;
       int i;
       
       for( i=0; i<10; i++ ) {
  @@ -460,8 +465,6 @@
       jk_uriEnv_t *serverEnv=(jk_uriEnv_t *)
           ap_get_module_config(s->module_config, &jk2_module);
       jk_env_t *env;
  -    apr_proc_t proc;
  -
           
       if( workerEnv==NULL )
           workerEnv = serverEnv->workerEnv;
  @@ -473,11 +476,8 @@
           
           jk2_init( env, pconf, workerEnv, s );
       
  -        proc.pid=getpid();
  -        workerEnv->chId=find_child_by_pid( & proc );
  -        
           env->l->jkLog(env, env->l, JK_LOG_INFO, "mod_jk child init %d %d\n",
  -                      workerEnv->was_initialized, workerEnv->chId );
  +                      workerEnv->was_initialized, workerEnv->childId );
       }
       
   }
  @@ -565,8 +565,9 @@
           rPool= worker->rPoolCache->get( env, worker->rPoolCache );
           if( rPool == NULL ) {
               rPool=worker->mbean->pool->create( env, worker->mbean->pool, 
HUGE_POOL_SIZE );
  -            env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                          "mod_jk.handler(): new rpool %p\n", rPool );
  +            if( uriEnv->mbean->debug > 0 )
  +                env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                              "mod_jk.handler(): new rpool %p\n", rPool );
           }
   
           /* XXX we should reuse the request itself !!! */
  
  
  

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

Reply via email to