You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by hg...@apache.org on 2001/09/05 11:32:39 UTC
cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_map.c jk_worker_list.h
hgomez 01/09/05 02:32:39
Modified: src/native/mod_jk/apache1.3 mod_jk.c
src/native/mod_jk/common jk_map.c jk_worker_list.h
Log:
workers.properties and log files could be
defined in relative mode
minor cosmetic clean-up (gcc complains about
missing endline)
Revision Changes Path
1.13 +25 -39 jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
Index: mod_jk.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- mod_jk.c 2001/09/03 11:30:31 1.12
+++ mod_jk.c 2001/09/05 09:32:39 1.13
@@ -102,14 +102,6 @@
#define JK_MAGIC_TYPE ("application/x-jakarta-servlet")
#define NULL_FOR_EMPTY(x) ((x && !strlen(x)) ? NULL : x)
-/*
- * If you are not using SSL, comment out the following line. It will make
- * apache run faster.
- *
- * Personally, I (DM), think this may be a lie.
- */
-#define ADD_SSL_INFO
-
module MODULE_VAR_EXPORT jk_module;
/*
@@ -430,30 +422,8 @@
s->remote_host = NULL_FOR_EMPTY(s->remote_host);
s->remote_addr = NULL_FOR_EMPTY(r->connection->remote_ip);
- /* Wrong: s->server_name = (char *)ap_get_server_name( r ); */
- s->server_name= (char *)(r->hostname ? r->hostname :
- r->server->server_hostname);
-
-
- s->server_port= htons( r->connection->local_addr.sin_port );
- /* Wrong: s->server_port = r->server->port; */
-
-
- /* Winners: htons( r->connection->local_addr.sin_port )
- (r->hostname ? r->hostname :
- r->server->server_hostname),
- */
- /* printf( "Port %u %u %u %s %s %s %d %d \n",
- ap_get_server_port( r ),
- htons( r->connection->local_addr.sin_port ),
- ntohs( r->connection->local_addr.sin_port ),
- ap_get_server_name( r ),
- (r->hostname ? r->hostname : r->server->server_hostname),
- r->hostname,
- r->connection->base_server->port,
- r->server->port
- );
- */
+ s->server_name = (char *)(r->hostname ? r->hostname : r->server->server_hostname);
+ s->server_port = htons( r->connection->local_addr.sin_port );
s->server_software = (char *)ap_get_server_version();
s->method = (char *)r->method;
@@ -616,10 +586,18 @@
jk_server_conf_t *conf =
(jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
+
+ /* we need an absolute path */
+ conf->worker_file = ap_server_root_relative(cmd->pool,worker_file);
- conf->worker_file = worker_file;
+ /* work-around Apache 1.3 bug in ap_server_root_relative */
+ if (conf->worker_file == worker_file)
+ conf->worker_file = ap_pstrdup(cmd->pool,worker_file);
+
+ if (conf->worker_file == NULL)
+ return "JkWorkersFile file_name invalid";
- if (stat(worker_file, &statbuf) == -1)
+ if (stat(conf->worker_file, &statbuf) == -1)
return "Can't find the workers file specified";
return NULL;
@@ -633,8 +611,16 @@
jk_server_conf_t *conf =
(jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
- conf->log_file = log_file;
+ /* we need an absolute path */
+ conf->log_file = ap_server_root_relative(cmd->pool,log_file);
+ /* work-around Apache 1.3 bug in ap_server_root_relative */
+ if ( conf->log_file == log_file)
+ conf->log_file = ap_pstrdup(cmd->pool,log_file);
+
+ if (conf->log_file == NULL)
+ return "JkLogFile file_name invalid";
+
return NULL;
}
@@ -691,9 +677,9 @@
return NULL;
}
-static const char *jk_set_sesion_indicator(cmd_parms *cmd,
- void *dummy,
- char *indicator)
+static const char *jk_set_session_indicator(cmd_parms *cmd,
+ void *dummy,
+ char *indicator)
{
server_rec *s = cmd->server;
jk_server_conf_t *conf =
@@ -794,7 +780,7 @@
"Name of the Apache environment that contains SSL client certificates"},
{"JkCIPHERIndicator", jk_set_cipher_indicator, NULL, RSRC_CONF, TAKE1,
"Name of the Apache environment that contains SSL client cipher"},
- {"JkSESSIONIndicator", jk_set_sesion_indicator, NULL, RSRC_CONF, TAKE1,
+ {"JkSESSIONIndicator", jk_set_session_indicator, NULL, RSRC_CONF, TAKE1,
"Name of the Apache environment that contains SSL session"},
{"JkExtractSSL", jk_set_enable_ssl, NULL, RSRC_CONF, FLAG,
"Turns on SSL processing and information gathering by mod_jk"},
1.3 +3 -2 jakarta-tomcat/src/native/mod_jk/common/jk_map.c
Index: jk_map.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_map.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_map.c 2000/11/10 18:48:50 1.2
+++ jk_map.c 2001/09/05 09:32:39 1.3
@@ -56,7 +56,7 @@
/***************************************************************************
* Description: General purpose map object *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#include "jk_global.h"
@@ -465,4 +465,5 @@
}
return rc;
-}
\ No newline at end of file
+}
+
1.3 +3 -2 jakarta-tomcat/src/native/mod_jk/common/jk_worker_list.h
Index: jk_worker_list.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_worker_list.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_worker_list.h 2001/03/12 21:09:30 1.2
+++ jk_worker_list.h 2001/09/05 09:32:39 1.3
@@ -56,7 +56,7 @@
/***************************************************************************
* Description: Worker list *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
/*
@@ -127,4 +127,5 @@
{ NULL, NULL}
};
#endif /* _JK_WORKER_LIST_H */
-#endif /* _PLACE_WORKER_LIST_HERE */
\ No newline at end of file
+#endif /* _PLACE_WORKER_LIST_HERE */
+