From: Jim Jagielski Date: Thu, 31 Mar 2011 19:29:21 +0000 (+0000) Subject: Make the 'need to reset' more generic by extending its reach X-Git-Tag: 2.3.12~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8999572c0cf45a7fba8e304e29d0f099b48591d;p=thirdparty%2Fapache%2Fhttpd.git Make the 'need to reset' more generic by extending its reach git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087415 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index dc7567495b2..f59bd0b6b11 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -977,6 +977,8 @@ static int balancer_handler(request_rec *r) /* First set the params */ if (wsel && ok2change) { const char *val; + int was_usable = PROXY_WORKER_IS_USABLE(wsel); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "settings worker params"); if ((val = apr_table_get(params, "w_lf"))) { @@ -1006,12 +1008,7 @@ static int balancer_handler(request_rec *r) ap_proxy_set_wstatus('N', atoi(val), wsel); } if ((val = apr_table_get(params, "w_status_D"))) { - int was_usable = PROXY_WORKER_IS_USABLE(wsel); ap_proxy_set_wstatus('D', atoi(val), wsel); - /* if enabling, we need to reset all lb params */ - if (!was_usable && PROXY_WORKER_IS_USABLE(wsel)) { - bsel->s->need_reset = 1; - } } if ((val = apr_table_get(params, "w_status_H"))) { ap_proxy_set_wstatus('H', atoi(val), wsel); @@ -1022,6 +1019,10 @@ static int balancer_handler(request_rec *r) wsel->s->lbset = ival; } } + /* if enabling, we need to reset all lb params */ + if (bsel && !was_usable && PROXY_WORKER_IS_USABLE(wsel)) { + bsel->s->need_reset = 1; + } }