diff options
author | Jim Jagielski <jim@apache.org> | 2011-03-31 20:41:23 +0200 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2011-03-31 20:41:23 +0200 |
commit | b405eca0381663613269b6d87ca68e39c28b81fd (patch) | |
tree | bd5be9860eddc1b754a92affd1aea7387b8cda88 /modules/proxy/balancers/mod_lbmethod_bytraffic.c | |
parent | If we change the LB method, or we take add in a new (diff) | |
download | apache2-b405eca0381663613269b6d87ca68e39c28b81fd.tar.xz apache2-b405eca0381663613269b6d87ca68e39c28b81fd.zip |
Implement reset() funcs for the LBmethods...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087407 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/balancers/mod_lbmethod_bytraffic.c')
-rw-r--r-- | modules/proxy/balancers/mod_lbmethod_bytraffic.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/proxy/balancers/mod_lbmethod_bytraffic.c b/modules/proxy/balancers/mod_lbmethod_bytraffic.c index d0aea4bf1f..fc058a6ce6 100644 --- a/modules/proxy/balancers/mod_lbmethod_bytraffic.c +++ b/modules/proxy/balancers/mod_lbmethod_bytraffic.c @@ -105,8 +105,18 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, return mycandidate; } +/* assumed to be mutex protected by caller */ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; + int i; + proxy_worker **worker; + worker = (proxy_worker **)balancer->workers->elts; + for (i = 0; i < balancer->workers->nelts; i++, worker++) { + (*worker)->s->lbstatus = 0; + (*worker)->s->busy = 0; + (*worker)->s->transferred = 0; + (*worker)->s->read = 0; + } + return APR_SUCCESS; } static apr_status_t age(proxy_balancer *balancer, server_rec *s) { |