tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/server/isapi jk_isapi_plugin.c jk_iis.h
Date Wed, 24 Apr 2002 23:00:14 GMT
nacho       02/04/24 16:00:14

  Modified:    jk/native2/server/isapi jk_isapi_plugin.c jk_iis.h
  Log:
  * Reading the config file
  * Removed some debug code
  * Load and does some logging :)
  
  XXX: trying ajp13 worker issues a NPE, needs absolute paths for be able to log.
  
  Revision  Changes    Path
  1.8       +14 -23    jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_isapi_plugin.c	20 Apr 2002 03:06:18 -0000	1.7
  +++ jk_isapi_plugin.c	24 Apr 2002 23:00:14 -0000	1.8
  @@ -60,7 +60,7 @@
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Larry Isaacs <larryi@apache.org>                           *
    * Author:      Ignacio J. Ortega <nacho@apache.org>                       *
  - * Version:     $Revision: 1.7 $                                           *
  + * Version:     $Revision: 1.8 $                                           *
    ***************************************************************************/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -105,7 +105,6 @@
   static char worker_file[MAX_PATH * 2];
   static char server_root[MAX_PATH * 2];
   
  -FILE *fLog;
   
   
   #define URI_SELECT_OPT_PARSED       0
  @@ -117,9 +116,9 @@
   
   static int init_jk(char *serverName);
   
  -static int initialize_extension(void);
  +static int initialize_extension();
   
  -static int read_registry_init_data(void);
  +static int read_registry_init_data();
   
   static int get_registry_config_parameter(HKEY hkey,
                                            const char *tag, 
  @@ -172,11 +171,9 @@
       strcpy(pVer->lpszFilterDesc, VERSION_STRING);
   
       if (!is_inited) {
  -        fprintf(fLog,"GetFilterVersion::!is_inited\n");
           return initialize_extension();
       }
   
  -    fprintf(fLog,"GetFilterVersion::Return TRUE\n");
       return TRUE;
   }
   
  @@ -412,7 +409,6 @@
       if (!is_inited) {
           return initialize_extension();
       }
  -
       return TRUE;
   }
   
  @@ -523,9 +519,6 @@
       char dir[_MAX_DIR];
       char fname[_MAX_FNAME];
       char file_name[_MAX_PATH];
  -    
  -    fLog=fopen("c:\\isapi.log","a");
  -    fprintf(fLog,"DllMain::ulReason=%d\n",ulReason);
   
       switch (ulReason) {
           case DLL_PROCESS_DETACH:
  @@ -544,8 +537,6 @@
       } else {
           fReturn = JK_FALSE;
       }
  -    fprintf(fLog,"DllMain::fReturn=%d\n",fReturn);
  -    fclose(fLog);
       return fReturn;
   }
   
  @@ -553,8 +544,10 @@
   {
       int rc = JK_FALSE;  
          
  -    jk_env_t *env=jk2_create_config();
  -    
  +    jk_env_t *env=jk2_create_config();   
  +
  +    rc=workerEnv->config->setPropertyString( env, workerEnv->config, "config.file",
worker_file );
  +
       /* Logging the initialization type: registry or properties file in virtual dir
       */
       if (using_ini_file) {
  @@ -571,13 +564,11 @@
       return rc;
   }
   
  -static int initialize_extension(void)
  +static int initialize_extension()
   {
  -    fprintf(fLog,"initialize_extension::is_inited=%d\n",is_inited);
       if (read_registry_init_data()) {
           is_inited = JK_TRUE;
       }
  -    fprintf(fLog,"initialize_extension::is_inited=%d\n",is_inited);
       return is_inited;
   }
   
  @@ -598,7 +589,7 @@
       return -1;
   }
   
  -static int read_registry_init_data(void)
  +static int read_registry_init_data()
   {
       char tmpbuf[INTERNET_MAX_URL_LENGTH];
       HKEY hkey;
  @@ -658,7 +649,7 @@
               return JK_FALSE;
           } 
   
  -        if(get_registry_config_parameter(hkey,
  +        if(rc=get_registry_config_parameter(hkey,
                                            EXTENSION_URI_TAG,
                                            tmpbuf,
                                            sizeof(extension_uri))) {
  @@ -667,7 +658,7 @@
               ok = JK_FALSE;
           }
   
  -        if(get_registry_config_parameter(hkey,
  +        if(rc=get_registry_config_parameter(hkey,
                                            SERVER_ROOT_TAG,
                                            tmpbuf,
                                            sizeof(server_root))) {
  @@ -675,7 +666,7 @@
           } else {
               ok = JK_FALSE;
           }
  -        if(get_registry_config_parameter(hkey,
  +        if(rc=get_registry_config_parameter(hkey,
                                            JK_WORKER_FILE_TAG,
                                            tmpbuf,
                                            sizeof(worker_file))) {
  @@ -684,7 +675,7 @@
               ok = JK_FALSE;
           }
   
  -        if(get_registry_config_parameter(hkey,
  +        if(rc=get_registry_config_parameter(hkey,
                                            URI_SELECT_TAG, 
                                            tmpbuf,
                                            sizeof(tmpbuf))) {
  @@ -785,7 +776,7 @@
       jk_uriEnv_t *newUri;
       jk_bean_t *jkb;
       jk_env_t *env;
  -    if(  workerEnv==NULL ) {
  +   if(  workerEnv==NULL ) {
           env=jk2_create_workerEnv();
       }
   
  
  
  
  1.7       +7 -7      jakarta-tomcat-connectors/jk/native2/server/isapi/jk_iis.h
  
  Index: jk_iis.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_iis.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_iis.h	20 Apr 2002 03:06:18 -0000	1.6
  +++ jk_iis.h	24 Apr 2002 23:00:14 -0000	1.7
  @@ -85,21 +85,21 @@
    * 3. The contents of the Translate header, if any
    *
    */
  -#define URI_HEADER_NAME         ("TOMCATURI:")
  -#define QUERY_HEADER_NAME       ("TOMCATQUERY:")
  -#define WORKER_HEADER_NAME      ("TOMCATWORKER:")
  +#define URI_HEADER_NAME          ("TOMCATURI:")
  +#define QUERY_HEADER_NAME        ("TOMCATQUERY:")
  +#define WORKER_HEADER_NAME       ("TOMCATWORKER:")
   #define TOMCAT_TRANSLATE_HEADER_NAME ("TOMCATTRANSLATE:")
  -#define CONTENT_LENGTH          ("CONTENT_LENGTH:")
  +#define CONTENT_LENGTH           ("CONTENT_LENGTH:")
   
   #define HTTP_URI_HEADER_NAME     ("HTTP_TOMCATURI")
   #define HTTP_QUERY_HEADER_NAME   ("HTTP_TOMCATQUERY")
   #define HTTP_WORKER_HEADER_NAME  ("HTTP_TOMCATWORKER")
   
  -#define SERVER_NAME                              ("SERVER_NAME" )
  +#define SERVER_NAME              ("SERVER_NAME" )
   
  -#define SERVER_SOFTWARE                  ("SERVER_SOFTWARE")
  +#define SERVER_SOFTWARE          ("SERVER_SOFTWARE")
   
  -#define REGISTRY_LOCATION       ("Software\\Apache Software Foundation\\Jakarta Isapi Redirector\\2.0")
  +#define REGISTRY_LOCATION        ("Software\\Apache Software Foundation\\Jakarta Isapi
Redirector\\2.0")
   
   #define BAD_REQUEST             -1
   #define BAD_PATH                -2
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message