You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/12/31 20:15:12 UTC

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_endpoint.h jk_map.h

costin      01/12/31 11:15:12

  Modified:    jk/native2/include jk_endpoint.h jk_map.h
  Log:
  Added getBool ( needed in few places ).
  
  Fixed the multi-value properties. The original code used some
  hardocded properties names ( path, env ) and a special hack to
  concatenate and split them. The new code is much simpler ( since
  it now supports multi-values in the table, like apr_table ).
  
  This has an effect on configuration - it's no longer needed
  to have all the values on the same line with ',', you can just
  use one line per value.
  
  Revision  Changes    Path
  1.9       +1 -6      jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
  
  Index: jk_endpoint.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_endpoint.h	16 Dec 2001 23:17:23 -0000	1.8
  +++ jk_endpoint.h	31 Dec 2001 19:15:12 -0000	1.9
  @@ -61,7 +61,7 @@
    * Author:      Gal Shachor <sh...@il.ibm.com>                           
    * Author:      Dan Milstein <da...@shore.net>                            
    * Author:      Henri Gomez <hg...@slib.fr>                               
  - * Version:     $Revision: 1.8 $                                          
  + * Version:     $Revision: 1.9 $                                          
    ***************************************************************************/
   
   #ifndef JK_ENDPOINT_H
  @@ -187,11 +187,6 @@
        * request.  For some protocols (e.g. ajp12), this frees the memory
        * associated with the endpoint.  For others (e.g. ajp13/ajp14), this can
         * return the endpoint to a cache of already opened endpoints.  
  -     *
  -     * Note that the first argument is *not* a 'this' pointer, but is
  -     * rather a pointer to a 'this' pointer.  This is necessary, because
  -     * we may need to free this object.
  -     *
        * XXX This is the 'pair' of worker.getEndpoint - it should be part of
        * worker.
        */
  
  
  
  1.7       +29 -5     jakarta-tomcat-connectors/jk/native2/include/jk_map.h
  
  Index: jk_map.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_map.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_map.h	16 Dec 2001 23:17:23 -0000	1.6
  +++ jk_map.h	31 Dec 2001 19:15:12 -0000	1.7
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Map object header file                                     *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           *
  - * Version:     $Revision: 1.6 $                                           *
  + * Version:     $Revision: 1.7 $                                           *
    ***************************************************************************/
   
   #ifndef JK_MAP_H
  @@ -130,9 +130,12 @@
    *  on any map.
    */
   
  -char *jk_map_getString(struct jk_env *env, jk_map_t *m,
  +char *jk_map_getString(struct jk_env *env, struct jk_map *m,
                          const char *name, char *def);
   
  +int jk_map_getBool(struct jk_env *env, struct jk_map *m,
  +                   const char *prop, const char *def);
  +
   /** Get a string property, using the worker's style
       for properties.
       Example worker.ajp13.host=localhost.
  @@ -188,10 +191,31 @@
                                  const char *value);
   
   
  +/** For multi-value properties, return the concatenation
  + *  of all values.
  + *
  + * @param sep Separators used to separate multi-values and
  + *       when concatenating the values, NULL for none. The first
  + *       char will be used on the result, the other will be
  + *       used to split. ( i.e. the map may either have multiple
  + *       values or values separated by one of the sep's chars )
  + *    
  + */
  +char *jk_map_getValuesString(struct jk_env *env, struct jk_map *m,
  +                             struct jk_pool *resultPool,
  +                             char *name, char *sep );
  +
  +
  +/** For multi-value properties, return the array containing
  + * all values.
  + *
  + * @param sep Optional separator, it'll be used to split existing values.
  + *            Curently only single-char separators are supported. 
  + */
  +char **jk_map_getValues(struct jk_env *env, struct jk_map *m,
  +                        struct jk_pool *resultPool,
  +                        char *name, char *sep, int *count);
   
  -/* XXX Very strange hack to deal with special properties
  - */
  -int jk_is_some_property(struct jk_env *env, const char *prp_name, const char *suffix);
       
   #ifdef __cplusplus
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>