You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mm...@apache.org on 2001/06/20 00:45:01 UTC
cvs commit: jakarta-tomcat/src/native/apache1.3 mod_jk.c
mmanders 01/06/19 15:45:01
Modified: src/native/apache1.3 Tag: tomcat_32 mod_jk.c
Log:
Added a check for the workers.properties file to allow Apache to come down clean if the path/file doesn't exist.
Fixed memory leaks when using VirtualHost sections in Apache.
Revision Changes Path
No revision
No revision
1.7.2.5 +22 -7 jakarta-tomcat/src/native/apache1.3/Attic/mod_jk.c
Index: mod_jk.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/apache1.3/Attic/mod_jk.c,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -u -r1.7.2.4 -r1.7.2.5
--- mod_jk.c 2001/05/19 04:23:41 1.7.2.4
+++ mod_jk.c 2001/06/19 22:44:57 1.7.2.5
@@ -483,8 +483,11 @@
server_rec *s = cmd->server;
jk_server_conf_t *conf =
(jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
+ struct stat statbuf;
conf->worker_file = worker_file;
+ if (stat(worker_file, &statbuf) == -1)
+ return "Can't find the workers file specified";
return NULL;
}
@@ -904,14 +907,26 @@
static void exit_handler (server_rec *s, ap_pool *p)
{
- jk_server_conf_t *conf =
- (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
+ server_rec *tmp = s;
- wc_close(conf->log);
- uri_worker_map_free(&(conf->uw_map), conf->log);
- map_free(&(conf->uri_to_context));
- if (conf->log)
- jk_close_file_logger(&(conf->log));
+ /* loop through all available servers to clean up all configuration
+ * records we've created
+ */
+ while (NULL != tmp)
+ {
+ jk_server_conf_t *conf =
+ (jk_server_conf_t *)ap_get_module_config(tmp->module_config, &jk_module);
+
+ if (NULL != conf)
+ {
+ wc_close(conf->log);
+ uri_worker_map_free(&(conf->uw_map), conf->log);
+ map_free(&(conf->uri_to_context));
+ if (conf->log)
+ jk_close_file_logger(&(conf->log));
+ }
+ tmp = tmp->next;
+ }
}
static const handler_rec jk_handlers[] =