httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r484783 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Date Fri, 08 Dec 2006 21:13:03 GMT
Author: jim
Date: Fri Dec  8 13:13:01 2006
New Revision: 484783

URL: http://svn.apache.org/viewvc?view=rev&rev=484783
Log:
No need for each ind lb method to increment the elected
element. Do so from the main calling func.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?view=diff&rev=484783&r1=484782&r2=484783
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Fri Dec  8 13:13:01 2006
@@ -293,6 +293,9 @@
 
     candidate = (*balancer->lbmethod->finder)(balancer, r);
 
+    if (candidate)
+        candidate->s->elected++;
+
 /*
         PROXY_THREAD_UNLOCK(balancer);
         return NULL;
@@ -976,7 +979,6 @@
 
     if (mycandidate) {
         mycandidate->s->lbstatus -= total_factor;
-        mycandidate->s->elected++;
     }
 
     return mycandidate;
@@ -1054,10 +1056,6 @@
         }
         cur_lbset++;
     } while (cur_lbset <= max_lbset && !mycandidate);
-
-    if (mycandidate) {
-        mycandidate->s->elected++;
-    }
 
     return mycandidate;
 }



Mime
View raw message