summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy_balancer.c
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2006-08-03 13:41:14 +0200
committerJim Jagielski <jim@apache.org>2006-08-03 13:41:14 +0200
commit3eeb5a123b8cc3f2a41592b5184d77670cb5e109 (patch)
tree6875b1397f0cb6f63b7856cfae71e6e4e3307c58 /modules/proxy/mod_proxy_balancer.c
parentReset standby flags for each loop through the cluster sets (diff)
downloadapache2-3eeb5a123b8cc3f2a41592b5184d77670cb5e109.tar.xz
apache2-3eeb5a123b8cc3f2a41592b5184d77670cb5e109.zip
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
Diffstat (limited to '')
-rw-r--r--modules/proxy/mod_proxy_balancer.c16
1 files changed, 10 insertions, 6 deletions
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++) {