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_util.c
Date Mon, 08 Nov 2004 13:48:12 GMT
mturk       2004/11/08 05:48:12

  Modified:    jk/native/common jk_util.c
  Log:
  Add recycle_timeout instead socket_timeout
  
  Revision  Changes    Path
  1.32      +21 -8     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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- jk_util.c	5 Nov 2004 15:28:39 -0000	1.31
  +++ jk_util.c	8 Nov 2004 13:48:11 -0000	1.32
  @@ -50,6 +50,7 @@
   #define REPLY_TIMEOUT_OF_WORKER     ("reply_timeout")
   #define SOCKET_TIMEOUT_OF_WORKER    ("socket_timeout")
   #define SOCKET_KEEPALIVE_OF_WORKER  ("socket_keepalive")
  +#define RECYCLE_TIMEOUT_OF_WORKER   ("recycle_timeout")
   #define LOAD_FACTOR_OF_WORKER       ("lbfactor")
   #define BALANCED_WORKERS            ("balanced_workers")
   #define STICKY_SESSION              ("sticky_session")
  @@ -61,7 +62,7 @@
   
   #define DEFAULT_WORKER              JK_AJP12_WORKER_NAME
   #define WORKER_LIST_PROPERTY_NAME   ("worker.list")
  -#define DEFAULT_LB_FACTOR           (1.0)
  +#define DEFAULT_LB_FACTOR           (1)
   #define LOG_FORMAT                  ("log_format")
   
   #define TOMCAT32_BRIDGE_NAME        ("tomcat32")
  @@ -205,11 +206,9 @@
   {
       if (l && *l) {
           file_logger_t *p = (*l)->logger_private;
  -        if (p) {
  -          fflush(p->logfile);
  -          fclose(p->logfile);
  -          free(p);
  -        }
  +        fflush(p->logfile);
  +        fclose(p->logfile);
  +        free(p);
           free(*l);
           *l = NULL;
   
  @@ -471,6 +470,20 @@
       return map_get_int(m, buf, def);
   }
   
  +int jk_get_worker_recycle_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,
  +            RECYCLE_TIMEOUT_OF_WORKER);
  +
  +    return map_get_int(m, buf, def);
  +}
  +
   int jk_get_worker_recovery_opts(jk_map_t *m, const char *wname, int def)
   {
       char buf[1024];
  @@ -520,7 +533,7 @@
       jk_log_fmt = (logformat) ? logformat : JK_TIME_FORMAT;
   }
   
  -double jk_get_lb_factor(jk_map_t *m, const char *wname)
  +int jk_get_lb_factor(jk_map_t *m, const char *wname)
   {
       char buf[1024];
   
  @@ -530,7 +543,7 @@
   
       sprintf(buf, "%s.%s.%s", PREFIX_OF_WORKER, wname, LOAD_FACTOR_OF_WORKER);
   
  -    return map_get_double(m, buf, DEFAULT_LB_FACTOR);
  +    return map_get_int(m, buf, DEFAULT_LB_FACTOR);
   }
   
   int jk_get_is_sticky_session(jk_map_t *m, const char *wname)
  
  
  

---------------------------------------------------------------------
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