costin      02/01/25 22:58:50

  Modified:    jk/native2/common jk_worker_status.c
  Log:
  Removed all the endpoint stuff. This workers will display various info for debugging,
  but it needs the info :-)
  
  Revision  Changes    Path
  1.3       +12 -102   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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_worker_status.c        12 Jan 2002 05:20:17 -0000      1.2
  +++ jk_worker_status.c        26 Jan 2002 06:58:50 -0000      1.3
  @@ -213,7 +213,7 @@
   
   }
   
  -static jk_buff_t *jk_worker_status_createBuffer(jk_env_t *env, jk_endpoint_t *e,
  +static jk_buff_t *jk_worker_status_createBuffer(jk_env_t *env, 
                                                   jk_ws_service_t *s)
   {
       jk_buff_t *buff;
  @@ -229,13 +229,13 @@
       return buff;
   }
   
  -static int JK_METHOD service(jk_env_t *env, jk_endpoint_t *e, 
  -                             jk_ws_service_t *s,
  -                             int *is_recoverable_error)
  +static int JK_METHOD service(jk_env_t *env,
  +                             jk_worker_t *w, 
  +                             jk_ws_service_t *s)
   {
  -    jk_buff_t *buff=jk_worker_status_createBuffer(env, e, s );
  +    jk_buff_t *buff=jk_worker_status_createBuffer(env, s );
       
  -    env->l->jkLog(env, env->l, JK_LOG_INFO, "status.service() %p\n", e);
  +    env->l->jkLog(env, env->l, JK_LOG_INFO, "status.service()\n");
   
       /* Generate the header */
       s->status=200;
  @@ -255,98 +255,6 @@
       s->afterRequest( env, s);
       fprintf(stderr, "After req %s \n", buff);
       return JK_TRUE;
  -
  -}
  -
  -static int JK_METHOD done(jk_env_t *env, jk_endpoint_t *e)
  -{
  -    return JK_TRUE;
  -}
  -
  -static int JK_METHOD validate(jk_env_t *env, jk_worker_t *_this,
  -                              jk_map_t *props, jk_workerEnv_t *we)
  -{
  -    return JK_TRUE;
  -}
  -
  -static int JK_METHOD init(jk_env_t *env, jk_worker_t *_this,
  -                          jk_map_t *props, jk_workerEnv_t *we)
  -{
  -    return JK_TRUE;
  -}
  -
  -static int JK_METHOD get_endpoint(jk_env_t *env, jk_worker_t *_this,
  -                                  jk_endpoint_t **pend)
  -{
  -    jk_endpoint_t *e;
  -    jk_pool_t *endpointPool;
  -    
  -    if (_this->endpointCache != NULL ) {
  -        e=_this->endpointCache->get( env, _this->endpointCache );
  -        if (e!=NULL) {
  -            env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                     "status.getEndpoint(): Reusing endpoint\n");
  -            *pend = e;
  -            return JK_TRUE;
  -        }
  -    }
  -    
  -    endpointPool=_this->pool->create( env, _this->pool, HUGE_POOL_SIZE);
  -    
  -    e = (jk_endpoint_t *)endpointPool->calloc(env, endpointPool,
  -                                              sizeof(jk_endpoint_t));
  -    if(e==NULL) {
  -        env->l->jkLog(env, env->l, JK_LOG_ERROR, 
  -                      "status_worker.getEndpoint() OutOfMemoryException\n");
  -        return JK_FALSE;
  -    }
  -
  -    e->pool = endpointPool;
  -    e->cPool=endpointPool->create( env,endpointPool, HUGE_POOL_SIZE );
  -    e->worker = _this;
  -    e->service = service;
  -    e->done = done;
  -    e->channelData = NULL;
  -    *pend = e;
  -
  -    env->l->jkLog(env, env->l, JK_LOG_INFO, "status_worker.getEndpoint() %p\n", e);
  -    return JK_TRUE;
  -}
  -
  -
  -static int JK_METHOD destroy(jk_env_t *env, jk_worker_t *w)
  -{
  -    int i = 0;
  -
  -    if(w==NULL ) {
  -        env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "status_worker.destroy() NullPointerException\n");
  -        return JK_FALSE;
  -    }
  -
  -    if( w->endpointCache != NULL ) {
  -        for( i=0; i< w->endpointCache->ep_cache_sz; i++ ) {
  -            jk_endpoint_t *e;
  -            
  -            e= w->endpointCache->get( env, w->endpointCache );
  -            if( e==NULL ) {
  -                // we finished all endpoints in the cache
  -                break;
  -            }
  -
  -            /* Nothing else to clean up ? */
  -            e->cPool->close( env, e->cPool );
  -            e->pool->close( env, e->pool );
  -        }
  -        w->endpointCache->destroy( env, w->endpointCache );
  -
  -        env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                      "status.destroy() closed %d cached endpoints\n",i);
  -    }
  -
  -    w->pool->close(env, w->pool);    
  -
  -    return JK_TRUE;
   }
   
   
  @@ -376,11 +284,13 @@
       _this->lb_workers = NULL;
       _this->num_of_workers = 0;
       _this->worker_private = NULL;
  -    _this->validate       = validate;
  -    _this->init           = init;
  -    _this->get_endpoint   = get_endpoint;
  -    _this->destroy        = destroy;
       
  +    _this->validate       = NULL;
  +    _this->init           = NULL;
  +    _this->destroy        = NULL;
  +    
  +    _this->service        = service;
  +
       *result=_this;
   
       return JK_TRUE;
  
  
  

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

Reply via email to