From: Jim Jagielski Date: Thu, 3 Aug 2006 11:41:14 +0000 (+0000) Subject: Initialization change. Move to a different format X-Git-Tag: 2.3.0~2174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3eeb5a123b8cc3f2a41592b5184d77670cb5e109;p=apache Initialization change. Move to a different format to force resets as well as a common technique, in case _route is updated at some point. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428361 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 9bd24dc4bf..86050fa973 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -180,10 +180,12 @@ static proxy_worker *find_route_worker(proxy_balancer *balancer, const char *route, request_rec *r) { int i; - int checking_standby = 0; - int checked_standby = 0; + int checking_standby; + int checked_standby; proxy_worker *worker; + + checking_standby = checked_standby = 0; while (!checked_standby) { worker = (proxy_worker *)balancer->workers->elts; for (i = 0; i < balancer->workers->nelts; i++, worker++) { @@ -878,6 +880,8 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer, proxy_worker *mycandidate = NULL; int cur_lbset = 0; int max_lbset = 0; + int checking_standby; + int checked_standby; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: Entering byrequests for BALANCER (%s)", @@ -885,8 +889,7 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer, /* First try to see if we have available candidate */ do { - int checking_standby = 0; - int checked_standby = 0; + checking_standby = checked_standby = 0; while (!mycandidate && !checked_standby) { worker = (proxy_worker *)balancer->workers->elts; for (i = 0; i < balancer->workers->nelts; i++, worker++) { @@ -956,6 +959,8 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, proxy_worker *mycandidate = NULL; int cur_lbset = 0; int max_lbset = 0; + int checking_standby; + int checked_standby; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: Entering bytraffic for BALANCER (%s)", @@ -963,8 +968,7 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, /* First try to see if we have available candidate */ do { - int checking_standby = 0; - int checked_standby = 0; + checking_standby = checked_standby = 0; while (!mycandidate && !checked_standby) { worker = (proxy_worker *)balancer->workers->elts; for (i = 0; i < balancer->workers->nelts; i++, worker++) {