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 Sat, 12 Feb 2005 11:55:34 GMT
mturk       2005/02/12 03:55:34

  Modified:    jk/native/apache-1.3 mod_jk.c
               jk/native/apache-2.0 mod_jk.c
               jk/native/common jk_service.h jk_uri_worker_map.c
                        jk_uri_worker_map.h
               jk/native/iis jk_isapi_plugin.c
  Log:
  Resolve constness for uri_worker_map. The worker is const per request.
  
  Revision  Changes    Path
  1.64      +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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_jk.c	6 Feb 2005 13:30:34 -0000	1.63
  +++ mod_jk.c	12 Feb 2005 11:55:33 -0000	1.64
  @@ -1926,7 +1926,7 @@
   
           if (conf) {
               jk_logger_t *l = conf->log ? conf->log : main_log;
  -            char *worker = map_uri_to_worker(conf->uw_map, r->uri, l);
  +            const char *worker = map_uri_to_worker(conf->uw_map, r->uri, l);
   
               /* Don't know the worker, ForwardDirectories is set, there is a
                * previous request for which the handler is JK_HANDLER (as set by
  
  
  
  1.123     +3 -3      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.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- mod_jk.c	9 Feb 2005 07:39:08 -0000	1.122
  +++ mod_jk.c	12 Feb 2005 11:55:33 -0000	1.123
  @@ -2376,7 +2376,7 @@
                                                         &jk_module);
   
           if (conf) {
  -            char *worker;
  +            const char *worker;
               char *uri;
               if ((r->handler != NULL) && (!strcmp(r->handler, JK_HANDLER)))
{
                   /* Somebody already set the handler, probably manual config
  @@ -2556,7 +2556,7 @@
                                                         &jk_module);
   
           if (conf) {
  -            char *worker;
  +            const char *worker;
               char *uri;
               if ((r->handler != NULL) && (!strcmp(r->handler, JK_HANDLER)))
{
                   /* Somebody already set the handler, probably manual config
  
  
  
  1.23      +2 -2      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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- jk_service.h	12 Feb 2005 11:33:59 -0000	1.22
  +++ jk_service.h	12 Feb 2005 11:55:33 -0000	1.23
  @@ -123,7 +123,7 @@
        */
       const char *method;
       const char *protocol;
  -    const char *req_uri;
  +    char *req_uri;
       const char *remote_addr;
       const char *remote_host;
       const char *remote_user;
  
  
  
  1.44      +6 -8      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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- jk_uri_worker_map.c	6 Feb 2005 13:30:34 -0000	1.43
  +++ jk_uri_worker_map.c	12 Feb 2005 11:55:33 -0000	1.44
  @@ -49,7 +49,7 @@
       char *uri;
   
       /* Name of worker mapped */
  -    char *worker_name;
  +    const char *worker_name;
   
       /* Suffix of uri */
       char *suffix;
  @@ -569,7 +569,6 @@
               continue;
   
           if (uwr->match_type == MATCH_TYPE_WILDCHAR_PATH) {
  -            char *wname;
               /* Map is already sorted by ctxt_len */
               if (wildchar_match(uri, uwr->context,
   #ifdef WIN32
  @@ -578,7 +577,6 @@
                                  0
   #endif
                                  ) == 0) {
  -                    wname = uwr->worker_name;
                       jk_log(l, JK_LOG_DEBUG,
                              "Found a wildchar no match %s -> %s",
                              uwr->worker_name, uwr->context);
  @@ -661,15 +659,15 @@
   }
   
   
  -char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
  -                        char *uri, jk_logger_t *l)
  +const char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
  +                              char *uri, jk_logger_t *l)
   {
       unsigned int i;
       int best_match = -1;
       unsigned int longest_match = 0;
       char *url_rewrite;
       char rewrite_char = ';';
  -    char *rv = NULL;
  +    const char *rv = NULL;
   
       JK_TRACE_ENTER(l);
       if (!uw_map || !uri) {
  @@ -721,7 +719,7 @@
               jk_log(l, JK_LOG_DEBUG, "Attempting to map context URI '%s'", uwr->uri);
   
           if (uwr->match_type == MATCH_TYPE_WILDCHAR_PATH) {
  -            char *wname;
  +            const char *wname;
               /* Map is already sorted by ctxt_len */
               if (wildchar_match(uri, uwr->context,
   #ifdef WIN32
  
  
  
  1.14      +3 -3      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_uri_worker_map.h	6 Feb 2005 13:30:34 -0000	1.13
  +++ jk_uri_worker_map.h	12 Feb 2005 11:55:33 -0000	1.14
  @@ -47,8 +47,8 @@
   int uri_worker_map_add(jk_uri_worker_map_t *uw_map,
                          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);
  +const char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
  +                              char *uri, jk_logger_t *l);
   
   #ifdef __cplusplus
   }
  
  
  
  1.37      +7 -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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- jk_isapi_plugin.c	6 Feb 2005 13:30:34 -0000	1.36
  +++ jk_isapi_plugin.c	12 Feb 2005 11:55:34 -0000	1.37
  @@ -37,6 +37,7 @@
   #include "jk_service.h"
   #include "jk_worker.h"
   #include "jk_uri_worker_map.h"
  +#include "jk_shm.h"
   
   #define VERSION_STRING "Jakarta/ISAPI/" JK_VERSTRING
   
  @@ -702,7 +703,7 @@
   
           if (strlen(uri)) {
               int rc;
  -            char *worker = 0;
  +            const char *worker = NULL;
               query = strchr(uri, '?');
               if (query) {
                   *query++ = '\0';
  @@ -824,7 +825,7 @@
                   if (!AddHeader(pfc, URI_HEADER_NAME, forwardURI) ||
                       ((query != NULL && strlen(query) > 0)
                        ? !AddHeader(pfc, QUERY_HEADER_NAME, query) : FALSE) ||
  -                    !AddHeader(pfc, WORKER_HEADER_NAME, worker) ||
  +                    !AddHeader(pfc, WORKER_HEADER_NAME, (LPSTR)worker) ||
                       !SetHeader(pfc, "url", extension_uri)) {
                       jk_log(logger, JK_LOG_ERROR,
                              "error while adding request headers");
  @@ -1027,6 +1028,9 @@
       int rc = JK_FALSE;
       jk_map_t *map;
   
  +     /* Simulate shared memory */
  +     jk_shm_open(NULL);
  +
       if (!jk_open_file_logger(&logger, log_file, log_level)) {
           logger = NULL;
       }
  
  
  

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