tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_lb_worker.h jk_util.c jk_util.h
Date Tue, 22 Feb 2005 08:42:45 GMT
mturk       2005/02/22 00:42:45

  Modified:    jk/native/common jk_lb_worker.c jk_lb_worker.h jk_util.c
                        jk_util.h
  Log:
  Move "recover_time" to jk_util.c to be consistent with how other
  properties are handled. No functional change.
  
  Revision  Changes    Path
  1.70      +3 -8      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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- jk_lb_worker.c	22 Feb 2005 08:30:46 -0000	1.69
  +++ jk_lb_worker.c	22 Feb 2005 08:42:45 -0000	1.70
  @@ -39,9 +39,6 @@
   /* 
    * Time to wait before retry...
    */
  -#define WAIT_BEFORE_RECOVER (60*1)
  -#define WORKER_RECOVER_TIME ("recover_time")
  -
   #define JK_WORKER_IN_ERROR(w) ((w)->in_error_state && !(w)->is_disabled &&
!(w)->is_busy)
   #define JK_WORKER_USABLE(w)   (!(w)->in_error_state && !(w)->is_disabled
&& !(w)->is_busy)
   
  @@ -783,10 +780,8 @@
       pThis->retries = jk_get_worker_retries(props, p->s->name,
                                              JK_RETRIES);
       p->s->retries = pThis->retries;
  -    if (jk_get_worker_int_prop(props, p->s->name,
  -                               WORKER_RECOVER_TIME,
  -                               &i))
  -        p->s->recover_wait_time = i;
  +    p->s->recover_wait_time = jk_get_worker_recover_timeout(props, p->s->name,
  +                                                            WAIT_BEFORE_RECOVER);
       if (p->s->recover_wait_time < WAIT_BEFORE_RECOVER)
           p->s->recover_wait_time = WAIT_BEFORE_RECOVER;
   
  
  
  
  1.14      +2 -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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_lb_worker.h	17 Feb 2005 07:16:32 -0000	1.13
  +++ jk_lb_worker.h	22 Feb 2005 08:42:45 -0000	1.14
  @@ -41,6 +41,7 @@
   #define JK_LB_BYTRAFFIC       (1)
   #define JK_LB_METHOD_REQUESTS ("request")
   #define JK_LB_METHODTRAFFIC   ("traffic")
  +#define WAIT_BEFORE_RECOVER   (60)
   
   struct worker_record
   {
  
  
  
  1.61      +17 -1     jakarta-tomcat-connectors/jk/native/common/jk_util.c
  
  Index: jk_util.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- jk_util.c	17 Feb 2005 07:07:50 -0000	1.60
  +++ jk_util.c	22 Feb 2005 08:42:45 -0000	1.61
  @@ -67,6 +67,8 @@
   #define MOUNT_OF_WORKER             ("mount")
   #define METHOD_OF_WORKER            ("method")
   #define IS_WORKER_DISABLED          ("disabled")
  +#define WORKER_RECOVER_TIME         ("recover_time")
  +
   
   #define DEFAULT_WORKER_TYPE         JK_AJP13_WORKER_NAME
   #define SECRET_KEY_OF_WORKER        ("secretkey")
  @@ -496,6 +498,20 @@
       return jk_map_get_int(m, buf, def);
   }
   
  +int jk_get_worker_recover_timeout(jk_map_t *m, const char *wname, int def)
  +{
  +    char buf[1024];
  +
  +    if (!m || !wname) {
  +        return -1;
  +    }
  +
  +    sprintf(buf, "%s.%s.%s", PREFIX_OF_WORKER, wname,
  +            WORKER_RECOVER_TIME);
  +
  +    return jk_map_get_int(m, buf, def);
  +}
  +
   int jk_get_worker_socket_buffer(jk_map_t *m, const char *wname, int def)
   {
       char buf[1024];
  
  
  
  1.30      +3 -1      jakarta-tomcat-connectors/jk/native/common/jk_util.h
  
  Index: jk_util.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.h,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- jk_util.h	19 Feb 2005 10:54:49 -0000	1.29
  +++ jk_util.h	22 Feb 2005 08:42:45 -0000	1.30
  @@ -72,6 +72,8 @@
   
   int jk_get_worker_recycle_timeout(jk_map_t *m, const char *wname, int def);
   
  +int jk_get_worker_recover_timeout(jk_map_t *m, const char *wname, int def);
  +
   const char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def);
   
   const char *jk_get_worker_redirect(jk_map_t *m, const char *wname, const char *def);
  
  
  

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


Mime
View raw message