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 jk_util.h
Date Sat, 12 Feb 2005 19:26:42 GMT
mturk       2005/02/12 11:26:42

  Modified:    jk/native/common jk_util.c jk_util.h
  Log:
  Add mount directive for worker as mount list. This will enable to get
  rid of uriworkermap.properties as well as using dynamic config.
  
  Revision  Changes    Path
  1.54      +26 -2     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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- jk_util.c	6 Feb 2005 17:43:09 -0000	1.53
  +++ jk_util.c	12 Feb 2005 19:26:41 -0000	1.54
  @@ -62,6 +62,7 @@
   #define LOCAL_WORKER_ONLY_FLAG      ("local_worker_only")
   #define LOCAL_WORKER_FLAG           ("local_worker")
   #define DOMAIN_OF_WORKER            ("domain")
  +#define MOUNT_OF_WORKER             ("mount")
   
   #define DEFAULT_WORKER_TYPE         JK_AJP13_WORKER_NAME
   #define SECRET_KEY_OF_WORKER        ("secretkey")
  @@ -690,7 +691,7 @@
   
   int jk_get_lb_worker_list(jk_map_t *m,
                             const char *lb_wname,
  -                          char ***list, unsigned *num_of_wokers)
  +                          char ***list, unsigned int *num_of_wokers)
   {
       char buf[1024];
   
  @@ -719,6 +720,29 @@
       return JK_FALSE;
   }
   
  +int jk_get_worker_mount_list(jk_map_t *m,
  +                             const char *wname,
  +                             char ***list, unsigned int *num_of_maps)
  +{
  +    char buf[1024];
  +
  +    if (m && list && num_of_maps && wname) {
  +        char **ar = NULL;
  +
  +        sprintf(buf, "%s.%s.%s", PREFIX_OF_WORKER, wname,
  +                MOUNT_OF_WORKER);
  +        ar = jk_map_get_string_list(m, buf, num_of_maps, NULL);
  +        if (ar) {
  +            *list = ar;
  +            return JK_TRUE;
  +        }
  +        *list = NULL;
  +        *num_of_maps = 0;
  +    }
  +
  +    return JK_FALSE;
  +}
  +
   int jk_get_worker_mx(jk_map_t *m, const char *wname, unsigned *mx)
   {
       char buf[1024];
  
  
  
  1.25      +5 -3      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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_util.h	6 Feb 2005 13:30:34 -0000	1.24
  +++ jk_util.h	12 Feb 2005 19:26:42 -0000	1.25
  @@ -90,8 +90,10 @@
   
   int jk_get_lb_worker_list(jk_map_t *m,
                             const char *lb_wname,
  -                          char ***list, unsigned *num_of_wokers);
  -
  +                          char ***list, unsigned int *num_of_wokers);
  +int jk_get_worker_mount_list(jk_map_t *m,
  +                             const char *wname,
  +                             char ***list, unsigned int *num_of_maps);
   const char *jk_get_worker_secret(jk_map_t *m, const char *wname);
   
   int jk_get_worker_mx(jk_map_t *m, const char *wname, unsigned *mx);
  
  
  

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