From: Ruediger Pluem Date: Sun, 9 Oct 2005 11:02:20 +0000 (+0000) Subject: Merge r307389 from trunk: X-Git-Tag: 2.1.9~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97894239dae75cbcab60b8cbd2b24fda7870fa2d;p=thirdparty%2Fapache%2Fhttpd.git Merge r307389 from trunk: * Fix a declaration problem introduced in r195013 that is C99 but not ANSI C compatible. Thus move declaration of *worker to the top of find_session_route to make it ANSI C compatible again. Submitted by: NormW Reviewed by: Ruediger Pluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@307393 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 3cff08ebe4c..6c23a3a98fb 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -187,6 +187,8 @@ static proxy_worker *find_session_route(proxy_balancer *balancer, char **route, char **url) { + proxy_worker *worker = NULL; + if (!balancer->sticky) return NULL; /* Try to find the sticky route inside url */ @@ -208,7 +210,7 @@ static proxy_worker *find_session_route(proxy_balancer *balancer, /* We have a route in path or in cookie * Find the worker that has this route defined. */ - proxy_worker *worker = find_route_worker(balancer, *route); + worker = find_route_worker(balancer, *route); if (worker && !PROXY_WORKER_IS_USABLE(worker)) { /* We have a worker that is unusable. * It can be in error or disabled, but in case