From b405eca0381663613269b6d87ca68e39c28b81fd Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 31 Mar 2011 18:41:23 +0000 Subject: Implement reset() funcs for the LBmethods... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087407 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/balancers/mod_lbmethod_bytraffic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/proxy/balancers/mod_lbmethod_bytraffic.c') 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) { -- cgit v1.2.3