You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2012/03/22 13:29:29 UTC
svn commit: r1303753 - /tomcat/jk/trunk/native/common/jk_uri_worker_map.c
Author: mturk
Date: Thu Mar 22 12:29:28 2012
New Revision: 1303753
URL: http://svn.apache.org/viewvc?rev=1303753&view=rev
Log:
Fix the code that doesn't care about errors or return parms.
Modified:
tomcat/jk/trunk/native/common/jk_uri_worker_map.c
Modified: tomcat/jk/trunk/native/common/jk_uri_worker_map.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_uri_worker_map.c?rev=1303753&r1=1303752&r2=1303753&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_uri_worker_map.c (original)
+++ tomcat/jk/trunk/native/common/jk_uri_worker_map.c Thu Mar 22 12:29:28 2012
@@ -464,8 +464,8 @@ static void extension_fix_fail_on_status
}
-static void extension_fix_activation(jk_pool_t *p, const char *name, jk_worker_t *jw,
- rule_extension_t *extensions, jk_logger_t *l)
+static int extension_fix_activation(jk_pool_t *p, const char *name, jk_worker_t *jw,
+ rule_extension_t *extensions, jk_logger_t *l)
{
JK_TRACE_ENTER(l);
@@ -487,8 +487,9 @@ static void extension_fix_activation(jk_
jk_log(l, JK_LOG_ERROR,
"can't alloc extensions activation list");
JK_TRACE_EXIT(l);
- return;
- } else if (JK_IS_DEBUG_LEVEL(l))
+ return JK_FALSE;
+ }
+ else if (JK_IS_DEBUG_LEVEL(l))
jk_log(l, JK_LOG_DEBUG,
"Allocated activations array of size %d for lb worker %s",
extensions->activation_size, name);
@@ -526,24 +527,24 @@ static void extension_fix_activation(jk_
}
JK_TRACE_EXIT(l);
-
+ return JK_TRUE;
}
static void extension_fix_session(jk_pool_t *p, const char *name, jk_worker_t *jw,
rule_extension_t *extensions, jk_logger_t *l)
{
- if (jw->type != JK_LB_WORKER_TYPE && extensions->session_cookie) {
- jk_log(l, JK_LOG_WARNING,
- "Worker %s is not of type lb, extension "
- JK_UWMAP_EXTENSION_SESSION_COOKIE " for %s ignored",
- name, extensions->session_cookie);
- }
- if (jw->type != JK_LB_WORKER_TYPE && extensions->session_path) {
- jk_log(l, JK_LOG_WARNING,
- "Worker %s is not of type lb, extension "
- JK_UWMAP_EXTENSION_SESSION_PATH " for %s ignored",
- name, extensions->session_path);
- }
+ if (jw->type != JK_LB_WORKER_TYPE && extensions->session_cookie) {
+ jk_log(l, JK_LOG_WARNING,
+ "Worker %s is not of type lb, extension "
+ JK_UWMAP_EXTENSION_SESSION_COOKIE " for %s ignored",
+ name, extensions->session_cookie);
+ }
+ if (jw->type != JK_LB_WORKER_TYPE && extensions->session_path) {
+ jk_log(l, JK_LOG_WARNING,
+ "Worker %s is not of type lb, extension "
+ JK_UWMAP_EXTENSION_SESSION_PATH " for %s ignored",
+ name, extensions->session_path);
+ }
}
void extension_fix(jk_pool_t *p, const char *name,
@@ -556,7 +557,8 @@ void extension_fix(jk_pool_t *p, const c
name);
return;
}
- extension_fix_activation(p, name, jw, extensions, l);
+ if (!extension_fix_activation(p, name, jw, extensions, l))
+ return;
if (extensions->fail_on_status_str) {
extension_fix_fail_on_status(p, name, extensions, l);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org