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/iis jk_isapi_plugin.c
Date Sun, 06 Feb 2005 13:30:35 GMT
mturk       2005/02/06 05:30:35

  Modified:    jk/native/apache-1.3 mod_jk.c
               jk/native/apache-2.0 mod_jk.c
               jk/native/common jk_ajp12_worker.c jk_ajp14_worker.c
                        jk_ajp_common.c jk_ajp_common.h jk_connect.c
                        jk_connect.h jk_lb_worker.c jk_map.c jk_map.h
                        jk_service.h jk_uri_worker_map.c
                        jk_uri_worker_map.h jk_util.c jk_util.h jk_worker.c
               jk/native/iis jk_isapi_plugin.c
  Log:
  Change all property_get calls to 'const char *'.
  
  Revision  Changes    Path
  1.63      +2 -2      jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- mod_jk.c	6 Feb 2005 09:37:59 -0000	1.62
  +++ mod_jk.c	6 Feb 2005 13:30:34 -0000	1.63
  @@ -1781,7 +1781,7 @@
       int sz = jk_map_size(src);
       int i;
       for (i = 0; i < sz; i++) {
  -        char *name = jk_map_name_at(src, i);
  +        const char *name = jk_map_name_at(src, i);
           if (jk_map_get(src, name, NULL) == NULL) {
               if (!jk_map_put (dst, name,
                    ap_pstrdup(p, jk_map_get_string(src, name, NULL)),
  
  
  
  1.120     +1 -1      jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- mod_jk.c	6 Feb 2005 11:30:46 -0000	1.119
  +++ mod_jk.c	6 Feb 2005 13:30:34 -0000	1.120
  @@ -2039,7 +2039,7 @@
       int sz = jk_map_size(src);
       int i;
       for (i = 0; i < sz; i++) {
  -        char *name = jk_map_name_at(src, i);
  +        const char *name = jk_map_name_at(src, i);
           if (jk_map_get(src, name, NULL) == NULL) {
               if (!jk_map_put(dst, name,
                               apr_pstrdup(p, jk_map_get_string(src, name, NULL)),
  
  
  
  1.18      +2 -2      jakarta-tomcat-connectors/jk/native/common/jk_ajp12_worker.c
  
  Index: jk_ajp12_worker.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp12_worker.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- jk_ajp12_worker.c	6 Feb 2005 09:37:59 -0000	1.17
  +++ jk_ajp12_worker.c	6 Feb 2005 13:30:34 -0000	1.18
  @@ -161,7 +161,7 @@
                                         p->name,
                                         AJP_DEF_PORT);
   
  -        char *host = jk_get_worker_host(props,
  +        const char *host = jk_get_worker_host(props,
                                           p->name,
                                           AJP_DEF_HOST);
   
  
  
  
  1.26      +2 -2      jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.c
  
  Index: jk_ajp14_worker.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- jk_ajp14_worker.c	6 Feb 2005 09:37:59 -0000	1.25
  +++ jk_ajp14_worker.c	6 Feb 2005 13:30:34 -0000	1.26
  @@ -257,7 +257,7 @@
                                 jk_worker_env_t *we, jk_logger_t *l)
   {
       ajp_worker_t *aw;
  -    char *secret_key;
  +    const char *secret_key;
   
       JK_TRACE_ENTER(l);
       if (ajp_validate(pThis, props, we, l, AJP14_PROTO) == JK_FALSE) {
  
  
  
  1.74      +2 -4      jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- jk_ajp_common.c	6 Feb 2005 09:37:59 -0000	1.73
  +++ jk_ajp_common.c	6 Feb 2005 13:30:34 -0000	1.74
  @@ -1693,7 +1693,7 @@
                    jk_worker_env_t *we, jk_logger_t *l, int proto)
   {
       int port;
  -    char *host;
  +    const char *host;
   
       JK_TRACE_ENTER(l);
   
  @@ -1882,8 +1882,6 @@
       if (pThis && *pThis && (*pThis)->worker_private) {
           ajp_worker_t *aw = (*pThis)->worker_private;
   
  -        free(aw->name);
  -
           if (JK_IS_DEBUG_LEVEL(l))
               jk_log(l, JK_LOG_DEBUG,
                      "up to %d endpoint to close",
  
  
  
  1.28      +3 -3      jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h
  
  Index: jk_ajp_common.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- jk_ajp_common.h	16 Dec 2004 09:49:42 -0000	1.27
  +++ jk_ajp_common.h	6 Feb 2005 13:30:34 -0000	1.28
  @@ -229,7 +229,7 @@
   {
       struct sockaddr_in worker_inet_addr;    /* Contains host and port */
       unsigned connect_retry_attempts;
  -    char *name;
  +    const char *name;
   
       /* 
        * Open connections cache...
  @@ -249,7 +249,7 @@
       jk_login_service_t *login;
   
       /* Weak secret similar with ajp12, used in ajp13 */
  -    char *secret;
  +    const char *secret;
   
       jk_worker_t worker;
   
  
  
  
  1.38      +8 -8      jakarta-tomcat-connectors/jk/native/common/jk_connect.c
  
  Index: jk_connect.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- jk_connect.c	6 Feb 2005 09:37:59 -0000	1.37
  +++ jk_connect.c	6 Feb 2005 13:30:34 -0000	1.38
  @@ -46,7 +46,7 @@
   
   /** resolve the host IP */
   
  -int jk_resolve(char *host, int port, struct sockaddr_in *rc)
  +int jk_resolve(const char *host, int port, struct sockaddr_in *rc)
   {
       int x;
       struct in_addr laddr;
  @@ -191,7 +191,7 @@
               if (JK_IS_DEBUG_LEVEL(l))
                   jk_log(l, JK_LOG_DEBUG,
                          "jk_open_socket, set TCP_NODELAY to on");
  -            setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&set,
  +            setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (const char *)&set,
                          sizeof(set));
           }
           if (keepalive) {
  @@ -199,13 +199,13 @@
               if (JK_IS_DEBUG_LEVEL(l))
                   jk_log(l, JK_LOG_DEBUG,
                          "jk_open_socket, set SO_KEEPALIVE to on");
  -            setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char *)&keep,
  +            setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (const char *)&keep,
                           sizeof(keep));
           }
           len = 8*1024; /* Default AJP packet size */
   
           /* Set socket send buffer size */
  -        if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&len,
  +        if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (const char *)&len,
                          sizeof(len))) {
               JK_GET_SOCKET_ERRNO();
               jk_log(l, JK_LOG_ERROR,
  @@ -215,7 +215,7 @@
               return -1;
           }
           /* Set socket receive buffer size */
  -        if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&len,
  +        if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (const char *)&len,
                                 sizeof(len))) {
               JK_GET_SOCKET_ERRNO();
               jk_log(l, JK_LOG_ERROR,
  @@ -274,12 +274,12 @@
       while (sent < len) {
           do {
   #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
  -            wr = send(sd, (char *)b + sent,
  +            wr = send(sd, (const char*)(b + sent),
                         len - sent, 0);
               if (wr == SOCKET_ERROR)
                   errno = WSAGetLastError() - WSABASEERR;
   #else
  -            wr = write(sd, (char *)b + sent , len - sent);
  +            wr = write(sd, b + sent, len - sent);
   #endif
           } while (wr == -1 && errno == EINTR);
   
  
  
  
  1.11      +2 -2      jakarta-tomcat-connectors/jk/native/common/jk_connect.h
  
  Index: jk_connect.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_connect.h	8 Nov 2004 13:28:31 -0000	1.10
  +++ jk_connect.h	6 Feb 2005 13:30:34 -0000	1.11
  @@ -35,7 +35,7 @@
   {
   #endif                          /* __cplusplus */
   
  -int jk_resolve(char *host, int port, struct sockaddr_in *rc);
  +int jk_resolve(const char *host, int port, struct sockaddr_in *rc);
   
   int jk_open_socket(struct sockaddr_in *addr, int ndelay,
                      int keepalive, int timeout, jk_logger_t *l);
  
  
  
  1.41      +5 -5      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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- jk_lb_worker.c	6 Feb 2005 09:37:59 -0000	1.40
  +++ jk_lb_worker.c	6 Feb 2005 13:30:34 -0000	1.41
  @@ -59,8 +59,8 @@
    */
   struct worker_record
   {
  -    char *name;
  -    char *domain;
  +    const char *name;
  +    const char *domain;
       int lb_factor;
       int lb_value;
       int is_local_worker;
  @@ -81,7 +81,7 @@
       jk_pool_t p;
       jk_pool_atom_t buf[TINY_POOL_SIZE];
   
  -    char *name;
  +    const char *name;
       jk_worker_t worker;
       int in_local_worker_mode;
       int local_worker_only;
  @@ -375,7 +375,7 @@
       while (sessionid) {
           char *next = strchr(sessionid, ';');
           char *session_route;
  -        char *session_domain;
  +        const char *session_domain;
           if (next) {
               *next++ = '\0';
           }
  
  
  
  1.25      +17 -15    jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_map.c	7 Dec 2004 14:29:55 -0000	1.24
  +++ jk_map.c	6 Feb 2005 13:30:34 -0000	1.25
  @@ -155,9 +155,9 @@
       return (void *)rc;          /* DIRTY */
   }
   
  -char *jk_map_get_string(jk_map_t *m, const char *name, const char *def)
  +const char *jk_map_get_string(jk_map_t *m, const char *name, const char *def)
   {
  -    char *rc = (char *)def;
  +    const char *rc = def;
   
       if (m && name) {
           unsigned int i;
  @@ -165,7 +165,7 @@
           COMPUTE_KEY_CHECKSUM(name, key)
           for (i = 0; i < m->size; i++) {
               if (m->keys[i] == key && strcasecmp(m->names[i], name) == 0)
{
  -                rc = (char *)m->values[i];
  +                rc = m->values[i];
                   break;
               }
           }
  @@ -178,7 +178,7 @@
   int jk_map_get_int(jk_map_t *m, const char *name, int def)
   {
       char buf[100];
  -    char *rc;
  +    const char *rc;
       size_t len;
       int int_res;
       int multit = 1;
  @@ -188,7 +188,8 @@
   
       len = strlen(rc);
       if (len) {
  -        char *lastchar = rc + len - 1;
  +        char *lastchar = &buf[0] + len - 1;
  +        strcpy(buf, rc);
           if ('m' == *lastchar || 'M' == *lastchar) {
               *lastchar = '\0';
               multit = 1024 * 1024;
  @@ -197,9 +198,10 @@
               *lastchar = '\0';
               multit = 1024;
           }
  +        int_res = atoi(buf);
       }
  -
  -    int_res = atoi(rc);
  +    else
  +        int_res = def;
   
       return int_res * multit;
   }
  @@ -207,7 +209,7 @@
   double jk_map_get_double(jk_map_t *m, const char *name, double def)
   {
       char buf[100];
  -    char *rc;
  +    const char *rc;
   
       sprintf(buf, "%f", def);
       rc = jk_map_get_string(m, name, buf);
  @@ -219,7 +221,7 @@
   {
       char buf[100];
       size_t len;
  -    char *rc;
  +    const char *rc;
       int rv = 0;
       
       sprintf(buf, "%d", def);
  @@ -239,7 +241,7 @@
                                 const char *name,
                                 unsigned *list_len, const char *def)
   {
  -    char *l = jk_map_get_string(m, name, def);
  +    const char *l = jk_map_get_string(m, name, def);
       char **ar = NULL;
   #if defined(AS400) || defined(_REENTRANT)
       char *lasts;
  @@ -340,7 +342,7 @@
               *v = '\0';
               v++;
               if (strlen(v) && strlen(prp)) {
  -                char *oldv = jk_map_get_string(m, prp, NULL);
  +                const char *oldv = jk_map_get_string(m, prp, NULL);
                   v = jk_map_replace_properties(v, m);
                   if (oldv) {
                       char *tmpv = jk_pool_alloc(&m->p,
  @@ -414,10 +416,10 @@
       return -1;
   }
   
  -char *jk_map_name_at(jk_map_t *m, int idex)
  +const char *jk_map_name_at(jk_map_t *m, int idex)
   {
       if (m && idex >= 0) {
  -        return (char *)m->names[idex];  /* DIRTY */
  +        return m->names[idex];  /* DIRTY */
       }
   
       return NULL;
  @@ -513,7 +515,7 @@
               return rc;
           if (env_end) {
               char env_name[LENGTH_OF_LINE + 1] = "";
  -            char *env_value;
  +            const char *env_value;
   #if defined(WIN32)
               char env_buf[LENGTH_OF_LINE + 1];
   #endif
  
  
  
  1.14      +3 -3      jakarta-tomcat-connectors/jk/native/common/jk_map.h
  
  Index: jk_map.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_map.h	19 Nov 2004 14:24:44 -0000	1.13
  +++ jk_map.h	6 Feb 2005 13:30:34 -0000	1.14
  @@ -49,7 +49,7 @@
   
   int jk_map_get_bool(jk_map_t *m, const char *name, int def);
   
  -char *jk_map_get_string(jk_map_t *m, const char *name, const char *def);
  +const char *jk_map_get_string(jk_map_t *m, const char *name, const char *def);
   
   char **jk_map_get_string_list(jk_map_t *m,
                              const char *name,
  @@ -63,7 +63,7 @@
   
   int jk_map_size(jk_map_t *m);
   
  -char *jk_map_name_at(jk_map_t *m, int idex);
  +const char *jk_map_name_at(jk_map_t *m, int idex);
   
   void *jk_map_value_at(jk_map_t *m, int idex);
   
  
  
  
  1.21      +3 -3      jakarta-tomcat-connectors/jk/native/common/jk_service.h
  
  Index: jk_service.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_service.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_service.h	12 Nov 2004 18:45:24 -0000	1.20
  +++ jk_service.h	6 Feb 2005 13:30:34 -0000	1.21
  @@ -191,7 +191,7 @@
        * group. We are using this variable to implement JVM session 
        * affinity
        */
  -    char *jvm_route;
  +    const char *jvm_route;
   
       /* Temp solution for auth. For native1 it'll be sent on each request,
          if an option is present. For native2 it'll be sent with the first
  @@ -199,7 +199,7 @@
          a version that doesn't support secret - don't set the secret,
          and it'll work.
        */
  -    char *secret;
  +    const char *secret;
       /*
        * Callbacks into the web server.  For each, the first argument is
        * essentially a 'this' pointer.  All return JK_TRUE on success
  
  
  
  1.43      +7 -4      jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c
  
  Index: jk_uri_worker_map.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- jk_uri_worker_map.c	6 Feb 2005 09:37:59 -0000	1.42
  +++ jk_uri_worker_map.c	6 Feb 2005 13:30:34 -0000	1.43
  @@ -273,7 +273,7 @@
   
   
   int uri_worker_map_add(jk_uri_worker_map_t *uw_map,
  -                       char *puri, char *pworker, jk_logger_t *l)
  +                       const char *puri, const char *pworker, jk_logger_t *l)
   {
       uri_worker_record_t *uwr;
       char *uri;
  @@ -526,6 +526,8 @@
       return (s - str);
   }
   
  +#if 0
  +/* deprecated */
   static void jk_no2slash(char *name)
   {
       char *d, *s;
  @@ -550,6 +552,7 @@
       }
       *d = '\0';
   }
  +#endif
   
   static int is_nomap_match(jk_uri_worker_map_t *uw_map,
                             const char *uri, jk_logger_t *l)
  @@ -664,8 +667,8 @@
       unsigned int i;
       int best_match = -1;
       unsigned int longest_match = 0;
  -    char *url_rewrite = NULL;
  -    char rewrite_char;
  +    char *url_rewrite;
  +    char rewrite_char = ';';
       char *rv = NULL;
   
       JK_TRACE_ENTER(l);
  
  
  
  1.13      +2 -2      jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.h
  
  Index: jk_uri_worker_map.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jk_uri_worker_map.h	13 Jan 2005 07:20:56 -0000	1.12
  +++ jk_uri_worker_map.h	6 Feb 2005 13:30:34 -0000	1.13
  @@ -45,7 +45,7 @@
                           jk_map_t *init_data, jk_logger_t *l);
   
   int uri_worker_map_add(jk_uri_worker_map_t *uw_map,
  -                       char *puri, char *pworker, jk_logger_t *l);
  +                       const char *puri, const char *pworker, jk_logger_t *l);
   
   char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
                           char *uri, jk_logger_t *l);
  
  
  
  1.52      +17 -20    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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- jk_util.c	6 Feb 2005 09:37:59 -0000	1.51
  +++ jk_util.c	6 Feb 2005 13:30:34 -0000	1.52
  @@ -339,7 +339,7 @@
       return rc;
   }
   
  -char *jk_get_worker_type(jk_map_t *m, const char *wname)
  +const char *jk_get_worker_type(jk_map_t *m, const char *wname)
   {
       char buf[1024];
   
  @@ -352,7 +352,7 @@
       return jk_map_get_string(m, buf, DEFAULT_WORKER_TYPE);
   }
   
  -char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def)
  +const char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def)
   {
       char buf[1024];
       if (!m || !wname) {
  @@ -362,10 +362,9 @@
       return jk_map_get_string(m, buf, def);
   }
   
  -char *jk_get_worker_secret(jk_map_t *m, const char *wname)
  +const char *jk_get_worker_secret(jk_map_t *m, const char *wname)
   {
       char buf[1024];
  -    char *secret;
   
       if (!m || !wname) {
           return NULL;
  @@ -373,9 +372,7 @@
   
       sprintf(buf, "%s.%s.%s", PREFIX_OF_WORKER, wname, SECRET_OF_WORKER);
   
  -    secret = jk_map_get_string(m, buf, NULL);
  -
  -    return secret;
  +    return jk_map_get_string(m, buf, NULL);
   }
   
   /* [V] I suggest that the following general purpose functions be used.       */
  @@ -383,7 +380,7 @@
   /*     Functions that can be simulated with these should be "deprecated".    */
   
   int jk_get_worker_str_prop(jk_map_t *m,
  -                           const char *wname, const char *pname, char **prop)
  +                           const char *wname, const char *pname, const char **prop)
   {
       char buf[1024];
   
  @@ -414,7 +411,7 @@
       return JK_FALSE;
   }
   
  -char *jk_get_worker_host(jk_map_t *m, const char *wname, const char *def)
  +const char *jk_get_worker_host(jk_map_t *m, const char *wname, const char *def)
   {
       char buf[1024];
   
  @@ -600,7 +597,7 @@
       return jk_map_get_int(m, buf, def);
   }
   
  -char *jk_get_worker_secret_key(jk_map_t *m, const char *wname)
  +const char *jk_get_worker_secret_key(jk_map_t *m, const char *wname)
   {
       char buf[1024];
   
  @@ -758,7 +755,7 @@
       return JK_FALSE;
   }
   
  -int jk_get_worker_classpath(jk_map_t *m, const char *wname, char **cp)
  +int jk_get_worker_classpath(jk_map_t *m, const char *wname, const char **cp)
   {
       char buf[1024];
   
  @@ -777,7 +774,7 @@
   int jk_get_worker_bridge_type(jk_map_t *m, const char *wname, unsigned *bt)
   {
       char buf[1024];
  -    char *type;
  +    const char *type;
   
       if (m && bt && wname) {
           sprintf(buf, "%s.%s.%s", PREFIX_OF_WORKER, wname, BRIDGE_OF_WORKER);
  @@ -803,7 +800,7 @@
       return JK_FALSE;
   }
   
  -int jk_get_worker_jvm_path(jk_map_t *m, const char *wname, char **vm_path)
  +int jk_get_worker_jvm_path(jk_map_t *m, const char *wname, const char **vm_path)
   {
       char buf[1024];
   
  @@ -820,7 +817,7 @@
   }
   
   /* [V] This is unused. currently. */
  -int jk_get_worker_callback_dll(jk_map_t *m, const char *wname, char **cb_path)
  +int jk_get_worker_callback_dll(jk_map_t *m, const char *wname, const char **cb_path)
   {
       char buf[1024];
   
  @@ -837,7 +834,7 @@
       return JK_FALSE;
   }
   
  -int jk_get_worker_cmd_line(jk_map_t *m, const char *wname, char **cmd_line)
  +int jk_get_worker_cmd_line(jk_map_t *m, const char *wname, const char **cmd_line)
   {
       char buf[1024];
   
  @@ -895,7 +892,7 @@
       return jk_is_some_property(prp_name, CMD_LINE_OF_WORKER);
   }
   
  -int jk_get_worker_stdout(jk_map_t *m, const char *wname, char **stdout_name)
  +int jk_get_worker_stdout(jk_map_t *m, const char *wname, const char **stdout_name)
   {
       char buf[1024];
   
  @@ -911,7 +908,7 @@
       return JK_FALSE;
   }
   
  -int jk_get_worker_stderr(jk_map_t *m, const char *wname, char **stderr_name)
  +int jk_get_worker_stderr(jk_map_t *m, const char *wname, const char **stderr_name)
   {
       char buf[1024];
   
  @@ -927,7 +924,7 @@
       return JK_FALSE;
   }
   
  -int jk_get_worker_sysprops(jk_map_t *m, const char *wname, char **sysprops)
  +int jk_get_worker_sysprops(jk_map_t *m, const char *wname, const char **sysprops)
   {
       char buf[1024];
   
  @@ -943,7 +940,7 @@
       return JK_FALSE;
   }
   
  -int jk_get_worker_libpath(jk_map_t *m, const char *wname, char **libpath)
  +int jk_get_worker_libpath(jk_map_t *m, const char *wname, const char **libpath)
   {
       char buf[1024];
   
  
  
  
  1.24      +15 -15    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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- jk_util.h	17 Dec 2004 08:31:25 -0000	1.23
  +++ jk_util.h	6 Feb 2005 13:30:34 -0000	1.24
  @@ -41,14 +41,14 @@
   
   /* [V] Two general purpose functions. Should ease the function bloat. */
   int jk_get_worker_str_prop(jk_map_t *m,
  -                           const char *wname, const char *pname, char **prop);
  +                           const char *wname, const char *pname, const char **prop);
   
   int jk_get_worker_int_prop(jk_map_t *m,
                              const char *wname, const char *pname, int *prop);
   
  -char *jk_get_worker_host(jk_map_t *m, const char *wname, const char *def);
  +const char *jk_get_worker_host(jk_map_t *m, const char *wname, const char *def);
   
  -char *jk_get_worker_type(jk_map_t *m, const char *wname);
  +const char *jk_get_worker_type(jk_map_t *m, const char *wname);
   
   int jk_get_worker_port(jk_map_t *m, const char *wname, int def);
   
  @@ -70,9 +70,9 @@
   
   int jk_get_worker_recycle_timeout(jk_map_t *m, const char *wname, int def);
   
  -char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def);
  +const char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def);
   
  -char *jk_get_worker_secret_key(jk_map_t *m, const char *wname);
  +const char *jk_get_worker_secret_key(jk_map_t *m, const char *wname);
   
   int jk_get_worker_retries(jk_map_t *m, const char *wname, int def);
   
  @@ -92,23 +92,23 @@
                             const char *lb_wname,
                             char ***list, unsigned *num_of_wokers);
   
  -char *jk_get_worker_secret(jk_map_t *m, const char *wname);
  +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);
   
   int jk_get_worker_ms(jk_map_t *m, const char *wname, unsigned *ms);
   
  -int jk_get_worker_classpath(jk_map_t *m, const char *wname, char **cp);
  +int jk_get_worker_classpath(jk_map_t *m, const char *wname, const char **cp);
   
   
   int jk_get_worker_bridge_type(jk_map_t *m, const char *wname, unsigned *bt);
   
  -int jk_get_worker_jvm_path(jk_map_t *m, const char *wname, char **vm_path);
  +int jk_get_worker_jvm_path(jk_map_t *m, const char *wname, const char **vm_path);
   
   int jk_get_worker_callback_dll(jk_map_t *m,
  -                               const char *wname, char **cb_path);
  +                               const char *wname, const char **cb_path);
   
  -int jk_get_worker_cmd_line(jk_map_t *m, const char *wname, char **cmd_line);
  +int jk_get_worker_cmd_line(jk_map_t *m, const char *wname, const char **cmd_line);
   
   int jk_file_exists(const char *f);
   
  @@ -116,13 +116,13 @@
   
   int jk_is_cmd_line_poperty(const char *prp_name);
   
  -int jk_get_worker_stdout(jk_map_t *m, const char *wname, char **stdout_name);
  +int jk_get_worker_stdout(jk_map_t *m, const char *wname, const char **stdout_name);
   
  -int jk_get_worker_stderr(jk_map_t *m, const char *wname, char **stderr_name);
  +int jk_get_worker_stderr(jk_map_t *m, const char *wname, const char **stderr_name);
   
  -int jk_get_worker_sysprops(jk_map_t *m, const char *wname, char **sysprops);
  +int jk_get_worker_sysprops(jk_map_t *m, const char *wname, const char **sysprops);
   
  -int jk_get_worker_libpath(jk_map_t *m, const char *wname, char **libpath);
  +int jk_get_worker_libpath(jk_map_t *m, const char *wname, const char **libpath);
   
   char **jk_parse_sysprops(jk_pool_t *p, const char *sysprops);
   
  
  
  
  1.27      +4 -4      jakarta-tomcat-connectors/jk/native/common/jk_worker.c
  
  Index: jk_worker.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_worker.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- jk_worker.c	6 Feb 2005 09:37:59 -0000	1.26
  +++ jk_worker.c	6 Feb 2005 13:30:34 -0000	1.27
  @@ -28,7 +28,7 @@
   
   static void close_workers(jk_logger_t *l);
   
  -static worker_factory get_factory_for(char *type);
  +static worker_factory get_factory_for(const char *type);
   
   static int build_worker_map(jk_map_t *init_data,
                               char **worker_list,
  @@ -103,7 +103,7 @@
       JK_TRACE_ENTER(l);
   
       if (rc) {
  -        char *type = jk_get_worker_type(init_data, name);
  +        const char *type = jk_get_worker_type(init_data, name);
           worker_factory fac = get_factory_for(type);
           jk_worker_t *w = NULL;
   
  @@ -225,7 +225,7 @@
       return JK_TRUE;
   }
   
  -static worker_factory get_factory_for(char *type)
  +static worker_factory get_factory_for(const char *type)
   {
       worker_factory_record_t *factory = &worker_factories[0];
       while (factory->name) {
  
  
  
  1.36      +3 -3      jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/iis/jk_isapi_plugin.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- jk_isapi_plugin.c	6 Feb 2005 09:38:00 -0000	1.35
  +++ jk_isapi_plugin.c	6 Feb 2005 13:30:34 -0000	1.36
  @@ -1058,7 +1058,7 @@
   
                   sz = jk_map_size(map);
                   for (i = 0; i < sz; i++) {
  -                    char *name = jk_map_name_at(map, i);
  +                    const char *name = jk_map_name_at(map, i);
                       if (*name == '/' || *name == '!') {
                           jk_map_put(map2, name, jk_map_value_at(map, i), &old);
                       }
  @@ -1141,7 +1141,7 @@
       HKEY hkey;
       long rc;
       int ok = JK_TRUE;
  -    char *tmp;
  +    const char *tmp;
       jk_map_t *map;
   
       if (jk_map_alloc(&map)) {
  
  
  

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