Author: mturk Date: Sun Oct 19 09:03:47 2008 New Revision: 706039 URL: http://svn.apache.org/viewvc?rev=706039&view=rev Log: Use optional APR pool used for configuration instead global pool.
Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_connect.c tomcat/connectors/trunk/jk/native/common/jk_connect.h tomcat/connectors/trunk/jk/native/common/jk_service.h tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Oct 19 09:03:47 2008 @@ -2719,6 +2719,7 @@ worker_env.uri_to_worker = conf->uw_map; worker_env.virtual = "*"; /* for now */ worker_env.server_name = (char *)ap_get_server_version(); + worker_env.pool = NULL; if (wc_open(jk_worker_properties, &worker_env, conf->log)) { #if MODULE_MAGIC_NUMBER >= 19980527 Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Oct 19 09:03:47 2008 @@ -3011,6 +3011,7 @@ #else worker_env.server_name = (char *)ap_get_server_version(); #endif + worker_env.pool = pconf; if (wc_open(jk_worker_properties, &worker_env, conf->log)) { ap_add_version_component(pconf, JK_EXPOSED_VERSION); Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Oct 19 09:03:47 2008 @@ -2453,7 +2453,7 @@ /* XXX: Why do we only resolve, if port > 1024 ? */ if (p->port > 1024) { - if (jk_resolve(p->host, p->port, &p->worker_inet_addr, l)) { + if (jk_resolve(p->host, p->port, &p->worker_inet_addr, we->pool, l)) { JK_TRACE_EXIT(l); return JK_TRUE; } Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sun Oct 19 09:03:47 2008 @@ -316,7 +316,8 @@ * @return JK_FALSE: some kind of error occured * JK_TRUE: success */ -int jk_resolve(const char *host, int port, struct sockaddr_in *rc, jk_logger_t *l) +int jk_resolve(const char *host, int port, struct sockaddr_in *rc, + void *pool, jk_logger_t *l) { int x; struct in_addr laddr; @@ -342,7 +343,7 @@ apr_sockaddr_t *remote_sa, *temp_sa; char *remote_ipaddr; - if (!jk_apr_pool) { + if (!(jk_apr_pool = (apr_pool_t *)pool)) { if (apr_pool_create(&jk_apr_pool, NULL) != APR_SUCCESS) { JK_TRACE_EXIT(l); return JK_FALSE; Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.h?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_connect.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_connect.h Sun Oct 19 09:03:47 2008 @@ -38,7 +38,7 @@ #define JK_SOCKET_EOF (-2) -int jk_resolve(const char *host, int port, struct sockaddr_in *rc, jk_logger_t *l); +int jk_resolve(const char *host, int port, struct sockaddr_in *rc, void *pool, jk_logger_t *l); jk_sock_t jk_open_socket(struct sockaddr_in *addr, int keepalive, int timeout, int connect_timeout, Modified: tomcat/connectors/trunk/jk/native/common/jk_service.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_service.h?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_service.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_service.h Sun Oct 19 09:03:47 2008 @@ -65,6 +65,9 @@ /* Virtual server handled - "*" is all virtual */ char *virtual; + + /* Optional APR pool used for configuration */ + void *pool; }; typedef struct jk_worker_env jk_worker_env_t; Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sun Oct 19 09:03:47 2008 @@ -2533,6 +2533,7 @@ worker_env.uri_to_worker = uw_map; worker_env.server_name = serverName; + worker_env.pool = NULL; if (wc_open(workers_map, &worker_env, logger)) { rc = JK_TRUE; Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?rev=706039&r1=706038&r2=706039&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Sun Oct 19 09:03:47 2008 @@ -99,6 +99,8 @@ uw_map->reload = JK_URIMAP_DEF_RELOAD; uw_map->reject_unsafe = jk_map_get_bool(init_map, "worker." REJECT_UNSAFE_TAG, JK_FALSE); worker_env.uri_to_worker = uw_map; + worker_env.pool = NULL; + if (wc_open(init_map, &worker_env, logger)) { init_on_other_thread_is_ok = JK_TRUE; uri_worker_map_ext(uw_map, logger); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]