Author: rjung Date: Sun Aug 27 08:06:49 2006 New Revision: 437379 URL: http://svn.apache.org/viewvc?rev=437379&view=rev Log: Log deprecated properties.
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_map.c tomcat/connectors/trunk/jk/native/common/jk_map.h tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c tomcat/connectors/trunk/jk/native/common/jk_util.h tomcat/connectors/trunk/jk/native/domino/jk_dsapi_plugin.c tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/isapi/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.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=437379&r1=437378&r2=437379&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 Aug 27 08:06:49 2006 @@ -1604,7 +1604,8 @@ (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); - if (jk_map_read_property(conf->worker_properties, line) == JK_FALSE) + jk_logger_t *l = conf->log ? conf->log : main_log; + if (jk_map_read_property(conf->worker_properties, line, l) == JK_FALSE) return ap_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line); return NULL; @@ -2164,7 +2165,7 @@ /*if(map_alloc(&init_map)) { */ - if (!jk_map_read_properties(init_map, conf->worker_file, NULL)) { + if (!jk_map_read_properties(init_map, conf->worker_file, NULL, conf->log)) { if (jk_map_size(init_map) == 0) { ap_log_error(APLOG_MARK, APLOG_EMERG, NULL, 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=437379&r1=437378&r2=437379&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 Aug 27 08:06:49 2006 @@ -1635,7 +1635,7 @@ (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); - if (jk_map_read_property(conf->worker_properties, line) == JK_FALSE) + if (jk_map_read_property(conf->worker_properties, line, conf->log) == JK_FALSE) return apr_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line); return NULL; @@ -2420,7 +2420,7 @@ } /* if(map_alloc(&init_map)) { */ - if (!jk_map_read_properties(init_map, conf->worker_file, NULL)) { + if (!jk_map_read_properties(init_map, conf->worker_file, NULL, conf->log)) { if (jk_map_size(init_map) == 0) { ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0, NULL, Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_map.c Sun Aug 27 08:06:49 2006 @@ -25,10 +25,9 @@ #endif #include "jk_global.h" -#include "jk_map.h" #include "jk_pool.h" -#include "jk_map.h" #include "jk_util.h" +#include "jk_map.h" #define CAPACITY_INC_SIZE (50) #define LENGTH_OF_LINE (8192) @@ -346,7 +345,7 @@ return rc; } -int jk_map_read_property(jk_map_t *m, const char *str) +int jk_map_read_property(jk_map_t *m, const char *str, jk_logger_t *l) { int rc = JK_TRUE; char buf[LENGTH_OF_LINE + 1]; @@ -365,7 +364,7 @@ trim(v); if (strlen(v) && strlen(prp)) { const char *oldv = jk_map_get_string(m, prp, NULL); - v = jk_map_replace_properties(v, m); + v = jk_map_replace_properties(m, v); if (oldv && jk_is_unique_property(prp) == JK_FALSE) { char *tmpv = jk_pool_alloc(&m->p, strlen(v) + strlen(oldv) + 3); @@ -383,10 +382,10 @@ } else { if (jk_is_deprecated_property(prp)) { - /* TODO: Log deprecated directive. - * It would require to pass the jk_log_t - * to jk_map_ functions. - */ + jk_log(l, JK_LOG_WARNING, + "The attribute %s is deprecated - please check" + " the documentation for the correct replacement.", + prp); } v = jk_pool_strdup(&m->p, v); } @@ -403,7 +402,7 @@ } -int jk_map_read_properties(jk_map_t *m, const char *f, time_t *modified) +int jk_map_read_properties(jk_map_t *m, const char *f, time_t *modified, jk_logger_t *l) { int rc = JK_FALSE; @@ -427,7 +426,7 @@ while (NULL != (prp = fgets(buf, LENGTH_OF_LINE, fp))) { trim_prp_comment(prp); if (*prp) { - if ((rc = jk_map_read_property(m, prp)) == JK_FALSE) + if ((rc = jk_map_read_property(m, prp, l)) == JK_FALSE) break; } } @@ -542,7 +541,7 @@ * Replace $(property) in value. * */ -char *jk_map_replace_properties(const char *value, jk_map_t *m) +char *jk_map_replace_properties(jk_map_t *m, const char *value) { char *rc = (char *)value; char *env_start = rc; Modified: tomcat/connectors/trunk/jk/native/common/jk_map.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.h?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_map.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_map.h Sun Aug 27 08:06:49 2006 @@ -59,9 +59,9 @@ int jk_map_put(jk_map_t *m, const char *name, const void *value, void **old); -int jk_map_read_property(jk_map_t *m, const char *str); +int jk_map_read_property(jk_map_t *m, const char *str, jk_logger_t *l); -int jk_map_read_properties(jk_map_t *m, const char *f, time_t *modified); +int jk_map_read_properties(jk_map_t *m, const char *f, time_t *modified, jk_logger_t *l); int jk_map_size(jk_map_t *m); @@ -73,8 +73,7 @@ * Replace $(property) in value. * */ -char *jk_map_replace_properties(const char *value, jk_map_t *m); - +char *jk_map_replace_properties(jk_map_t *m, const char *value); #ifdef __cplusplus } Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Sun Aug 27 08:06:49 2006 @@ -580,7 +580,7 @@ jk_map_alloc(&map); if (jk_map_read_properties(map, uw_map->fname, - &uw_map->modified)) { + &uw_map->modified, l)) { int i; for (i = 0; i < jk_map_size(map); i++) { const char *u = jk_map_name_at(map, i); Modified: tomcat/connectors/trunk/jk/native/common/jk_util.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.h?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_util.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_util.h Sun Aug 27 08:06:49 2006 @@ -25,9 +25,9 @@ #define _JK_UTIL_H #include "jk_global.h" +#include "jk_logger.h" #include "jk_map.h" #include "jk_pool.h" -#include "jk_logger.h" #include "jk_service.h" int jk_parse_log_level(const char *level); Modified: tomcat/connectors/trunk/jk/native/domino/jk_dsapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/domino/jk_dsapi_plugin.c?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/domino/jk_dsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/domino/jk_dsapi_plugin.c Sun Aug 27 08:06:49 2006 @@ -962,7 +962,7 @@ DEBUG(("Initialising worker map\n")); if (jk_map_alloc(&map)) { - if (jk_map_read_properties(map, workerMountFile)) + if (jk_map_read_properties(map, workerMountFile, logger)) if (uri_worker_map_alloc(&uw_map, map, logger)) ok = JK_TRUE; jk_map_free(&map); @@ -975,7 +975,7 @@ DEBUG(("About to allocate map\n")); if (jk_map_alloc(&map)) { DEBUG(("About to read %s\n", workerFile)); - if (jk_map_read_properties(map, workerFile)) { + if (jk_map_read_properties(map, workerFile, logger)) { #if defined(JK_VERSION) && JK_VERSION >= MAKEVERSION(1, 2, 0, 1) char server[256]; 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=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sun Aug 27 08:06:49 2006 @@ -1218,7 +1218,7 @@ } if (rewrite_rule_file[0] && jk_map_alloc(&rewrite_map)) { - if (jk_map_read_properties(rewrite_map, rewrite_rule_file, NULL)) { + if (jk_map_read_properties(rewrite_map, rewrite_rule_file, NULL, logger)) { if (JK_IS_DEBUG_LEVEL(logger)) { jk_log(logger, JK_LOG_DEBUG, "Loaded rewrite rule file %s.", rewrite_rule_file); @@ -1239,7 +1239,7 @@ if (rc) { rc = JK_FALSE; if (jk_map_alloc(&workers_map)) { - if (jk_map_read_properties(workers_map, worker_file, NULL)) { + if (jk_map_read_properties(workers_map, worker_file, NULL, logger)) { /* we add the URI->WORKER MAP since workers using AJP14 will feed it */ worker_env.uri_to_worker = uw_map; @@ -1299,7 +1299,7 @@ jk_map_t *map; if (jk_map_alloc(&map)) { - if (jk_map_read_properties(map, ini_file_name, NULL)) { + if (jk_map_read_properties(map, ini_file_name, NULL, logger)) { using_ini_file = JK_TRUE; } } Modified: tomcat/connectors/trunk/jk/native/isapi/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/isapi/jk_isapi_plugin.c?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/isapi/jk_isapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/isapi/jk_isapi_plugin.c Sun Aug 27 08:06:49 2006 @@ -974,7 +974,7 @@ DEBUG(("Initialising worker map\n")); if (jk_map_alloc(&map)) { - if (jk_map_read_properties(map, workerMountFile)) + if (jk_map_read_properties(map, workerMountFile, logger)) if (uri_worker_map_alloc(&uw_map, map, logger)) ok = JK_TRUE; jk_map_free(&map); @@ -987,7 +987,7 @@ DEBUG(("About to allocate map\n")); if (jk_map_alloc(&map)) { DEBUG(("About to read %s\n", workerFile)); - if (jk_map_read_properties(map, workerFile)) { + if (jk_map_read_properties(map, workerFile, logger)) { #if defined(JK_VERSION) && JK_VERSION >= MAKEVERSION(1, 2, 0, 1) char server[256]; 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=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Sun Aug 27 08:06:49 2006 @@ -244,7 +244,7 @@ jk_shm_open(shm_file, JK_SHM_DEF_SIZE, logger); if (jk_map_alloc(&init_map)) { - if (jk_map_read_properties(init_map, worker_prp_file, NULL)) { + if (jk_map_read_properties(init_map, worker_prp_file, NULL, logger)) { int sleep_cnt; SYS_THREAD s; Modified: tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c?rev=437379&r1=437378&r2=437379&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c (original) +++ tomcat/connectors/trunk/jk/native/nt_service/jk_nt_service.c Sun Aug 27 08:06:49 2006 @@ -955,7 +955,7 @@ jk_map_t *init_map; if(jk_map_alloc(&init_map)) { - if(jk_map_read_properties(init_map, prp_file, NULL)) { + if(jk_map_read_properties(init_map, prp_file, NULL, NULL)) { jk_tomcat_startup_data_t data; jk_pool_t p; jk_pool_atom_t buf[HUGE_POOL_SIZE]; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]