tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_ajp13.c
Date Thu, 16 May 2002 23:46:01 GMT
costin      02/05/16 16:46:01

  Modified:    jk/native2/common jk_worker_ajp13.c
  Log:
  Big cosmetic change: use ajp13 consistently.
  
  Revision  Changes    Path
  1.23      +120 -123  jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- jk_worker_ajp13.c	16 May 2002 21:03:45 -0000	1.22
  +++ jk_worker_ajp13.c	16 May 2002 23:46:01 -0000	1.23
  @@ -56,7 +56,7 @@
    * ========================================================================= */
   
   /**
  - * Description: AJP14 next generation Bi-directional protocol.
  + * Description: AJP13 next generation Bi-directional protocol.
    *              Backward compatible with Ajp13
    * Author:      Henri Gomez <hgomez@slib.fr>
    * Author:      Costin <costin@costin.dnt.ro>                              
  @@ -75,26 +75,23 @@
   #include "jk_registry.h"
   
   #define AJP_DEF_RETRY_ATTEMPTS    (2)
  -#define AJP14_PROTO 14
   #define AJP13_PROTO 13
   
   #define AJP13_DEF_HOST  ("localhost")
   #define AJP13_DEF_PORT  (8009)
  -#define AJP14_DEF_HOST  ("localhost")
  -#define AJP14_DEF_PORT  (8011)
   
   /* -------------------- Impl -------------------- */
  -static char *jk2_worker_ajp14_getAttributeInfo[]={ "lb_factor", "lb_value", 
  +static char *jk2_worker_ajp13_getAttributeInfo[]={ "lb_factor", "lb_value", 
                                                      "route", "errorState", "graceful",
                                                      "epCount", "errorTime", NULL };
   
  -static char *jk2_worker_ajp14_multiValueInfo[]={"group", NULL };
  +static char *jk2_worker_ajp13_multiValueInfo[]={"group", NULL };
   
  -static char *jk2_worker_ajp14_setAttributeInfo[]={"debug", "channel", "route",
  +static char *jk2_worker_ajp13_setAttributeInfo[]={"debug", "channel", "route",
                                                     "lb_factor", "level", NULL };
   
   
  -static void * JK_METHOD jk2_worker_ajp14_getAttribute(jk_env_t *env, jk_bean_t *bean, char
*name ) {
  +static void * JK_METHOD jk2_worker_ajp13_getAttribute(jk_env_t *env, jk_bean_t *bean, char
*name ) {
       jk_worker_t *worker=(jk_worker_t *)bean->object;
       
       if( strcmp( name, "channelName" )==0 ) {
  @@ -139,29 +136,29 @@
   
   
   /*
  - * Initialize the worker.
  + * Initialize the worker
    */
   static int JK_METHOD 
  -jk2_worker_ajp14_setAttribute(jk_env_t *env, jk_bean_t *mbean, 
  +jk2_worker_ajp13_setAttribute(jk_env_t *env, jk_bean_t *mbean, 
                                 char *name, void *valueP )
   {
  -    jk_worker_t *ajp14=(jk_worker_t *)mbean->object;
  +    jk_worker_t *ajp13=(jk_worker_t *)mbean->object;
       char *value=(char *)valueP;
              
       if( strcmp( name, "secretkey" )==0 ) {
  -        ajp14->secret = value;
  +        ajp13->secret = value;
       } else if( strcmp( name, "tomcatId" )==0 ) {
  -        ajp14->route=value;
  +        ajp13->route=value;
       } else if( strcmp( name, "route" )==0 ) {
  -        ajp14->route=value;
  +        ajp13->route=value;
       } else if( strcmp( name, "group" )==0 ) {
  -        ajp14->groups->add( env, ajp14->groups, value, ajp14 );
  +        ajp13->groups->add( env, ajp13->groups, value, ajp13 );
       } else if( strcmp( name, "lb_factor" )==0 ) {
  -        ajp14->lb_factor=atoi( value );
  +        ajp13->lb_factor=atoi( value );
       } else if( strcmp( name, "level" )==0 ) {
  -        ajp14->level=atoi( value );
  +        ajp13->level=atoi( value );
       } else if( strcmp( name, "channel" )==0 ) {
  -        ajp14->channelName=value;
  +        ajp13->channelName=value;
       } else {
           return JK_ERR;
       }
  @@ -223,9 +220,9 @@
       /*     ae->pool->close( env, ae->pool ); */
   }
   
  -/** Connect a channel, implementing the logging protocol if ajp14
  +/** Connect a channel, implementing the logging protocol if ajp13
    */
  -static int jk2_worker_ajp14_connect(jk_env_t *env, jk_endpoint_t *ae) {
  +static int jk2_worker_ajp13_connect(jk_env_t *env, jk_endpoint_t *ae) {
       jk_channel_t *channel=ae->worker->channel;
       jk_msg_t *msg;
       
  @@ -233,19 +230,19 @@
   
       if( channel==NULL ) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.connect() no channel %s\n", ae->worker->mbean->name
);
  +                      "ajp13.connect() no channel %s\n", ae->worker->mbean->name
);
           return JK_ERR;
       }
   
       if( ae->worker->mbean->debug > 0 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.connect() %s %s\n", ae->worker->channelName, channel->mbean->name
);
  +                      "ajp13.connect() %s %s\n", ae->worker->channelName, channel->mbean->name
);
       
       err=channel->open( env, channel, ae );
   
       if( err != JK_OK ) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.connect() failed %s\n", ae->worker->mbean->name );
  +                      "ajp13.connect() failed %s\n", ae->worker->mbean->name );
           return JK_ERR;
       }
   
  @@ -265,7 +262,7 @@
           return JK_OK;
   
       /* Do the logon process */
  -    env->l->jkLog(env, env->l, JK_LOG_INFO, "ajp14.connect() logging in\n" );
  +    env->l->jkLog(env, env->l, JK_LOG_INFO, "ajp13.connect() logging in\n" );
   
       /* use the reply buffer - it's a new channel, it is cetainly not
        in use. The request and post buffers are probably in use if this
  @@ -297,7 +294,7 @@
       fails, try to reconnect.
   */
   static int JK_METHOD
  -jk2_worker_ajp14_sendAndReconnect(jk_env_t *env, jk_worker_t *worker,
  +jk2_worker_ajp13_sendAndReconnect(jk_env_t *env, jk_worker_t *worker,
                                     jk_ws_service_t *s,
                                     jk_endpoint_t   *e )
   {
  @@ -315,10 +312,10 @@
           jk_channel_t *channel= worker->channel;
   
           if( e->sd == -1 ) {
  -            err=jk2_worker_ajp14_connect(env, e);
  +            err=jk2_worker_ajp13_connect(env, e);
               if( err!=JK_OK ) {
                   env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                              "ajp14.service() failed to connect endpoint errno=%d %s\n",
  +                              "ajp13.service() failed to connect endpoint errno=%d %s\n",
                                 errno, strerror( errno ));
   
                   e->worker->in_error_state=JK_TRUE;
  @@ -338,7 +335,7 @@
           }
   
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.service() error sending, reconnect %s %d %d %s\n",
  +                      "ajp13.service() error sending, reconnect %s %d %d %s\n",
                         e->worker->channelName, err, errno, strerror(errno));
   
           channel->close( env, channel, e );
  @@ -349,7 +346,7 @@
   
   
   static int JK_METHOD
  -jk2_worker_ajp14_forwardStream(jk_env_t *env, jk_worker_t *worker,
  +jk2_worker_ajp13_forwardStream(jk_env_t *env, jk_worker_t *worker,
                                 jk_ws_service_t *s,
                                 jk_endpoint_t   *e )
   {
  @@ -358,7 +355,7 @@
       e->recoverable = JK_TRUE;
       s->is_recoverable_error = JK_TRUE;
   
  -    err=jk2_worker_ajp14_sendAndReconnect( env, worker, s, e );
  +    err=jk2_worker_ajp13_sendAndReconnect( env, worker, s, e );
       if( err!=JK_OK )
           return err;
       
  @@ -384,7 +381,7 @@
               e->recoverable = JK_FALSE;
               s->is_recoverable_error = JK_FALSE;
               env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                          "ajp14.service() Error receiving initial post \n");
  +                          "ajp13.service() Error receiving initial post \n");
               return JK_ERR;
           }
           err= e->worker->channel->send( env, e->worker->channel, e,
  @@ -393,7 +390,7 @@
               e->recoverable = JK_FALSE;
               s->is_recoverable_error = JK_FALSE;
               env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                          "ajp14.service() Error receiving initial post \n");
  +                          "ajp13.service() Error receiving initial post \n");
               return JK_ERR;
           }
       }
  @@ -408,21 +405,21 @@
       if (! e->recoverable) {
           s->is_recoverable_error = JK_FALSE;
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.service() ajpGetReply unrecoverable error %d\n",
  +                      "ajp13.service() ajpGetReply unrecoverable error %d\n",
                         err);
           return JK_ERR;
       }
   
       if( err != JK_OK ) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.service() ajpGetReply recoverable error %d\n",
  +                      "ajp13.service() ajpGetReply recoverable error %d\n",
                         err);
       }
       return err;
   }
   
   static int JK_METHOD
  -jk2_worker_ajp14_forwardSingleThread(jk_env_t *env, jk_worker_t *worker,
  +jk2_worker_ajp13_forwardSingleThread(jk_env_t *env, jk_worker_t *worker,
                                       jk_ws_service_t *s,
                                       jk_endpoint_t   *e )
   {
  @@ -430,20 +427,20 @@
   
       if( e->worker->mbean->debug > 0 )
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.forwardST() Before calling native channel %s\n",
  +                      "ajp13.forwardST() Before calling native channel %s\n",
                         e->worker->channel->mbean->name);
       err=e->worker->channel->send( env, e->worker->channel, e,
                                     e->request );
       if( e->worker->mbean->debug > 0 )
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.forwardST() After %d\n",err);
  +                      "ajp13.forwardST() After %d\n",err);
       
       
       return err;
   }
        
   static int JK_METHOD
  -jk2_worker_ajp14_service1(jk_env_t *env, jk_worker_t *w,
  +jk2_worker_ajp13_service1(jk_env_t *env, jk_worker_t *w,
                           jk_ws_service_t *s,
                           jk_endpoint_t   *e )
   {
  @@ -451,13 +448,13 @@
   
       if( ( e== NULL ) || ( s == NULL ) ) {
   	env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.service() NullPointerException\n");
  +                      "ajp13.service() NullPointerException\n");
   	return JK_ERR;
       }
       
       if( w->channel==NULL ) {
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.service() no channel defined, error in init\n", w->mbean->name);
  +                      "ajp13.service() no channel defined, error in init\n", w->mbean->name);
           return JK_ERR;
       }
       
  @@ -485,13 +482,13 @@
       if (err!=JK_OK) {
   	s->is_recoverable_error = JK_FALSE;                
   	env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.service(): error marshaling\n");
  +                      "ajp13.service(): error marshaling\n");
   	return JK_ERR;
       }
   
       if( w->mbean->debug > 0 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.service() %s\n", w->channelName);
  +                      "ajp13.service() %s\n", w->channelName);
   
       if( w->channel->beforeRequest != NULL ) {
           w->channel->beforeRequest( env, w->channel, w, e, s );
  @@ -499,14 +496,14 @@
       
       /* First message for this request */
       if( w->channel->is_stream == JK_TRUE ) {
  -        err=jk2_worker_ajp14_forwardStream( env, w, s, e );
  +        err=jk2_worker_ajp13_forwardStream( env, w, s, e );
       } else {
  -        err=jk2_worker_ajp14_forwardSingleThread( env, w, s, e );
  +        err=jk2_worker_ajp13_forwardSingleThread( env, w, s, e );
       }
   
       if( w->mbean->debug > 0 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.service() done %s\n", e->worker->mbean->name);
  +                      "ajp13.service() done %s\n", e->worker->mbean->name);
   
       if( w->channel->afterRequest != NULL ) {
           w->channel->afterRequest( env, w->channel, w, e, s );
  @@ -521,7 +518,7 @@
   
   
   static int JK_METHOD
  -jk2_worker_ajp14_done(jk_env_t *env, jk_worker_t *we, jk_endpoint_t *e)
  +jk2_worker_ajp13_done(jk_env_t *env, jk_worker_t *we, jk_endpoint_t *e)
   {
       jk_worker_t *w;
       int rc=JK_OK;
  @@ -532,7 +529,7 @@
           e->cPool->reset(env, e->cPool);
   
       if( w->endpointCache == NULL ) {
  -        env->l->jkLog(env, env->l, JK_LOG_ERROR, "ajp14.done() No pool\n");
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, "ajp13.done() No pool\n");
           return JK_ERR;
       }
       
  @@ -540,88 +537,88 @@
           jk2_close_endpoint(env, e);
           /*     if( w->mbean->debug > 0 )  */
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.done() close endpoint %s error_state %d\n",
  +                      "ajp13.done() close endpoint %s error_state %d\n",
                         w->mbean->name, w->in_error_state );
       }
           
       rc=w->endpointCache->put( env, w->endpointCache, e );
       if( rc!=JK_OK ) {
  -        env->l->jkLog(env, env->l, JK_LOG_ERROR, "ajp14.done() Error recycling
ep\n");
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, "ajp13.done() Error recycling
ep\n");
           return rc;        
       }
       if( w->mbean->debug > 0 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.done() return to pool %s\n",
  +                      "ajp13.done() return to pool %s\n",
                         w->mbean->name );
       return JK_OK;
   }
   
   static int JK_METHOD
  -jk2_worker_ajp14_getEndpoint(jk_env_t *env,
  -                            jk_worker_t *ajp14,
  +jk2_worker_ajp13_getEndpoint(jk_env_t *env,
  +                            jk_worker_t *ajp13,
                               jk_endpoint_t **eP)
   {
       jk_endpoint_t *e = NULL;
       jk_bean_t *jkb;
       int csOk;
       
  -    if( ajp14->secret ==NULL ) {
  +    if( ajp13->secret ==NULL ) {
       }
   
  -    if( ajp14->endpointCache == NULL ) {
  -        env->l->jkLog(env, env->l, JK_LOG_ERROR, "ajp14.getEndpoint() No pool\n");
  +    if( ajp13->endpointCache == NULL ) {
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, "ajp13.getEndpoint() No pool\n");
           return JK_ERR;
       }
   
  -    e=ajp14->endpointCache->get( env, ajp14->endpointCache );
  +    e=ajp13->endpointCache->get( env, ajp13->endpointCache );
   
       if (e!=NULL) {
           *eP = e;
           return JK_OK;
       }
   
  -    JK_ENTER_CS(&ajp14->cs, csOk);
  +    JK_ENTER_CS(&ajp13->cs, csOk);
       if( !csOk ) return JK_ERR;
   
       {
  -        jkb=env->createBean2( env, ajp14->mbean->pool,  "endpoint", NULL );
  +        jkb=env->createBean2( env, ajp13->mbean->pool,  "endpoint", NULL );
           if( jkb==NULL ) {
  -            JK_LEAVE_CS( &ajp14->cs, csOk );
  +            JK_LEAVE_CS( &ajp13->cs, csOk );
               return JK_ERR;
           }
       
           e = (jk_endpoint_t *)jkb->object;
  -        e->worker = ajp14;
  +        e->worker = ajp13;
           e->sd=-1;
   
  -        ajp14->endpointMap->add( env, ajp14->endpointMap, jkb->localName, jkb
);
  +        ajp13->endpointMap->add( env, ajp13->endpointMap, jkb->localName, jkb
);
                                    
           *eP = e;
   
  -        ajp14->workerEnv->addEndpoint( env, ajp14->workerEnv, e );
  +        ajp13->workerEnv->addEndpoint( env, ajp13->workerEnv, e );
       }
  -    JK_LEAVE_CS( &ajp14->cs, csOk );
  +    JK_LEAVE_CS( &ajp13->cs, csOk );
           
  -    if( ajp14->mbean->debug > 0 )
  +    if( ajp13->mbean->debug > 0 )
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.getEndpoint(): Created endpoint %s %s \n",
  -                      ajp14->mbean->name, jkb->name);
  +                      "ajp13.getEndpoint(): Created endpoint %s %s \n",
  +                      ajp13->mbean->name, jkb->name);
       
       return JK_OK;
   }
   
   /*
  - * Serve the request, using AJP13/AJP14
  + * Serve the request, using AJP13/AJP13
    */
   static int JK_METHOD
  -jk2_worker_ajp14_service(jk_env_t *env, jk_worker_t *w,
  +jk2_worker_ajp13_service(jk_env_t *env, jk_worker_t *w,
                           jk_ws_service_t *s)
   {
       int err;
       jk_endpoint_t   *e;
   
       /* Get endpoint from the pool */
  -    jk2_worker_ajp14_getEndpoint( env, w, &e );
  +    jk2_worker_ajp13_getEndpoint( env, w, &e );
   
   #ifdef HAS_APR
       if( s->uriEnv->timing == JK_TRUE ) {
  @@ -633,7 +630,7 @@
   #endif
       e->stats->workerId=w->mbean->id;
       
  -    err=jk2_worker_ajp14_service1( env, w, s, e );
  +    err=jk2_worker_ajp13_service1( env, w, s, e );
   
       /* One error doesn't mean the whole worker is in error state.
        */
  @@ -655,89 +652,89 @@
               e->stats->maxTime=reqTime;
       }
   #endif
  -    jk2_worker_ajp14_done( env, w, e);
  +    jk2_worker_ajp13_done( env, w, e);
       return err;
   }
   
   
   static int JK_METHOD
  -jk2_worker_ajp14_init(jk_env_t *env, jk_bean_t *bean )
  +jk2_worker_ajp13_init(jk_env_t *env, jk_bean_t *bean )
   {
  -    jk_worker_t *ajp14=bean->object;
  +    jk_worker_t *ajp13=bean->object;
       int  rc;
       int size;
       int i;
   
  -    if(ajp14->channel != NULL &&
  -       ajp14->channel->mbean->debug > 0 ) {
  -        ajp14->mbean->debug = ajp14->channel->mbean->debug;
  +    if(ajp13->channel != NULL &&
  +       ajp13->channel->mbean->debug > 0 ) {
  +        ajp13->mbean->debug = ajp13->channel->mbean->debug;
       }
   
  -    if(ajp14->channel != NULL &&
  -       ajp14->channel->mbean->disabled  )
  -        ajp14->mbean->disabled = JK_TRUE;
  +    if(ajp13->channel != NULL &&
  +       ajp13->channel->mbean->disabled  )
  +        ajp13->mbean->disabled = JK_TRUE;
       
  -    ajp14->endpointCache=jk2_objCache_create( env, ajp14->mbean->pool  );
  +    ajp13->endpointCache=jk2_objCache_create( env, ajp13->mbean->pool  );
           
  -    if( ajp14->endpointCache == NULL ) {
  +    if( ajp13->endpointCache == NULL ) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.init(): error creating endpoint cache\n");
  +                      "ajp13.init(): error creating endpoint cache\n");
           return JK_ERR;
       }
       
       /* Will grow */
  -    rc=ajp14->endpointCache->init( env, ajp14->endpointCache, -1 );
  +    rc=ajp13->endpointCache->init( env, ajp13->endpointCache, -1 );
       if( rc!= JK_OK ) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.init(): error creating endpoint cache\n");
  +                      "ajp13.init(): error creating endpoint cache\n");
           return JK_ERR;
       }
   
  -    if( ajp14->channel == NULL ) {
  +    if( ajp13->channel == NULL ) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.init(): No channel %s\n", ajp14->mbean->localName);
  +                      "ajp13.init(): No channel %s\n", ajp13->mbean->localName);
           return JK_ERR;
       }
   
       
       /* Find the groups we are member on and add ourself in
        */
  -    size=ajp14->groups->size( env, ajp14->groups );
  +    size=ajp13->groups->size( env, ajp13->groups );
       if( size==0 ) {
           /* No explicit groups, it'll go to default lb */
  -        jk_worker_t *lb=ajp14->workerEnv->defaultWorker;
  +        jk_worker_t *lb=ajp13->workerEnv->defaultWorker;
           
           lb->mbean->setAttribute(env, lb->mbean, "worker",
  -                                ajp14->mbean->name);
  -        if( ajp14->mbean->debug > 0 ) 
  +                                ajp13->mbean->name);
  +        if( ajp13->mbean->debug > 0 ) 
               env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                          "ajp14.init(): Adding %s to default lb\n", ajp14->mbean->localName);
  +                          "ajp13.init(): Adding %s to default lb\n", ajp13->mbean->localName);
       } else {
           for( i=0; i<size; i++ ) {
  -            char *name= ajp14->groups->nameAt( env, ajp14->groups, i );
  +            char *name= ajp13->groups->nameAt( env, ajp13->groups, i );
               jk_worker_t *lb;
   
  -            if( ajp14->mbean->debug > 0 )
  +            if( ajp13->mbean->debug > 0 )
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "ajp14.init(): Adding %s to %s\n",
  -                              ajp14->mbean->localName, name);
  -            lb= env->getByName2( env, "worker.lb", name );
  +                              "ajp13.init(): Adding %s to %s\n",
  +                              ajp13->mbean->localName, name);
  +            lb= env->getByName2( env, "lb", name );
               if( lb==NULL ) {
                   /* Create the lb group */
  -                if( ajp14->mbean->debug > 0 ) 
  +                if( ajp13->mbean->debug > 0 ) 
                       env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                                  "ajp14.init(): Automatically creating the group %s\n",
  +                                  "ajp13.init(): Automatically creating the group %s\n",
                                     name);
  -                env->createBean2( env, ajp14->workerEnv->mbean->pool, "worker.lb",
name );
  -                lb= env->getByName2( env, "worker.lb", name );
  +                env->createBean2( env, ajp13->workerEnv->mbean->pool, "lb",
name );
  +                lb= env->getByName2( env, "lb", name );
                   if( lb==NULL ) {
                       env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                                  "ajp14.init(): Failed to create %s\n", name);
  +                                  "ajp13.init(): Failed to create %s\n", name);
                       return JK_ERR;
                   }
               }
               lb->mbean->setAttribute(env, lb->mbean, "worker",
  -                                    ajp14->mbean->name);
  +                                    ajp13->mbean->name);
           }
   
       }
  @@ -750,21 +747,21 @@
   
   
   static int JK_METHOD
  -jk2_worker_ajp14_destroy(jk_env_t *env, jk_bean_t *bean)
  +jk2_worker_ajp13_destroy(jk_env_t *env, jk_bean_t *bean)
   {
  -    jk_worker_t *ajp14=bean->object;
  +    jk_worker_t *ajp13=bean->object;
       int i;
   
  -    if( ajp14->mbean->debug > 0 ) 
  +    if( ajp13->mbean->debug > 0 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                      "ajp14.destroy()\n");
  +                      "ajp13.destroy()\n");
       
  -    if( ajp14->endpointCache != NULL ) {
  +    if( ajp13->endpointCache != NULL ) {
           jk_endpoint_t *e;
  -        i=ajp14->endpointCache->count;
  -        while( ajp14->endpointCache->count > 0 ) {
  +        i=ajp13->endpointCache->count;
  +        while( ajp13->endpointCache->count > 0 ) {
               
  -            e= ajp14->endpointCache->get( env, ajp14->endpointCache );
  +            e= ajp13->endpointCache->get( env, ajp13->endpointCache );
               
               if( e==NULL ) {
                   // we finished all endpoints in the cache
  @@ -774,17 +771,17 @@
               
               jk2_close_endpoint(env, e);
           }
  -        ajp14->endpointCache->destroy( env, ajp14->endpointCache );
  +        ajp13->endpointCache->destroy( env, ajp13->endpointCache );
   
           env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                      "ajp14.destroy() closed %d cached endpoints\n",
  +                      "ajp13.destroy() closed %d cached endpoints\n",
                         i);
       }
   
       return JK_OK;
   }
   
  -int JK_METHOD jk2_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool,
  +int JK_METHOD jk2_worker_ajp13_factory( jk_env_t *env, jk_pool_t *pool,
                                           jk_bean_t *result,
                                           const char *type, const char *name)
   {
  @@ -793,7 +790,7 @@
   
       if (name == NULL || w == NULL) {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "ajp14.factory() NullPointerException\n");
  +                      "ajp13.factory() NullPointerException\n");
           return JK_ERR;
       }
   
  @@ -811,16 +808,16 @@
       w->channel= NULL;
       w->secret= NULL;
      
  -    w->service = jk2_worker_ajp14_service;
  +    w->service = jk2_worker_ajp13_service;
   
  -    result->setAttribute= jk2_worker_ajp14_setAttribute;
  -    result->getAttribute= jk2_worker_ajp14_getAttribute;
  -    result->init= jk2_worker_ajp14_init;
  -    result->destroy=jk2_worker_ajp14_destroy;
  -
  -    result->getAttributeInfo=jk2_worker_ajp14_getAttributeInfo;
  -    result->multiValueInfo=jk2_worker_ajp14_multiValueInfo;
  -    result->setAttributeInfo=jk2_worker_ajp14_setAttributeInfo;
  +    result->setAttribute= jk2_worker_ajp13_setAttribute;
  +    result->getAttribute= jk2_worker_ajp13_getAttribute;
  +    result->init= jk2_worker_ajp13_init;
  +    result->destroy=jk2_worker_ajp13_destroy;
  +
  +    result->getAttributeInfo=jk2_worker_ajp13_getAttributeInfo;
  +    result->multiValueInfo=jk2_worker_ajp13_multiValueInfo;
  +    result->setAttributeInfo=jk2_worker_ajp13_setAttributeInfo;
   
       result->object = w;
       w->mbean=result;
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message