mturk 2005/02/14 09:22:36 Modified: jk/native/common jk_lb_worker.c jk_lb_worker.h Log: Make lb_worker_t structure public so jkstatus can us it. Revision Changes Path 1.48 +7 -30 jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c Index: jk_lb_worker.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- jk_lb_worker.c 13 Feb 2005 12:21:57 -0000 1.47 +++ jk_lb_worker.c 14 Feb 2005 17:22:35 -0000 1.48 @@ -52,33 +52,6 @@ NULL }; -struct worker_record -{ - jk_worker_t *w; - /* Shared memory worker data */ - jk_shm_worker_t *s; -}; - -typedef struct worker_record worker_record_t; - -struct lb_worker -{ - worker_record_t *lb_workers; - unsigned num_of_workers; - unsigned num_of_local_workers; - - jk_pool_t p; - jk_pool_atom_t buf[TINY_POOL_SIZE]; - - jk_worker_t worker; - JK_CRIT_SEC cs; - - /* Shared memory worker data */ - jk_shm_worker_t *s; -}; - -typedef struct lb_worker lb_worker_t; - struct lb_endpoint { jk_endpoint_t *e; @@ -470,9 +443,13 @@ jk_log(l, JK_LOG_DEBUG, "service worker=%s jvm_route=%s rc=%d", rec->s->name, s->jvm_route, rc); - + rec->s->elected++; if (rc && end) { - int src = end->service(end, s, l, &is_recoverable); + int src; + end->rd = end->wr = 0; + src = end->service(end, s, l, &is_recoverable); + rec->s->readed += end->rd; + rec->s->transferred += end->wr; end->done(&end, l); if (src) { rec->s->in_error_state = JK_FALSE; 1.10 +28 -1 jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.h Index: jk_lb_worker.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- jk_lb_worker.h 7 Dec 2004 12:24:53 -0000 1.9 +++ jk_lb_worker.h 14 Feb 2005 17:22:35 -0000 1.10 @@ -25,6 +25,8 @@ #include "jk_logger.h" #include "jk_service.h" +#include "jk_mt.h" +#include "jk_shm.h" #ifdef __cplusplus extern "C" @@ -34,6 +36,31 @@ #define JK_LB_WORKER_NAME ("lb") #define JK_LB_DEF_DOMAIN_NAME ("unknown") +struct worker_record +{ + jk_worker_t *w; + /* Shared memory worker data */ + jk_shm_worker_t *s; +}; +typedef struct worker_record worker_record_t; + +struct lb_worker +{ + worker_record_t *lb_workers; + unsigned num_of_workers; + unsigned num_of_local_workers; + + jk_pool_t p; + jk_pool_atom_t buf[TINY_POOL_SIZE]; + + jk_worker_t worker; + JK_CRIT_SEC cs; + + /* Shared memory worker data */ + jk_shm_worker_t *s; +}; +typedef struct lb_worker lb_worker_t; + int JK_METHOD lb_worker_factory(jk_worker_t **w, const char *name, jk_logger_t *l);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]