]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2808: getRoundRobinParent not handling weights correctly
authorAmos Jeffries <amosjeffries@squid-cache.org>
Sun, 24 Oct 2010 07:08:13 +0000 (01:08 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Sun, 24 Oct 2010 07:08:13 +0000 (01:08 -0600)
Suspected fix. Has not been able to be replicated before the change.

src/neighbors.cc

index d0b26e80a2deb0e40c36f40f1310cc01801700fa..0a636a8ca1cd325b7f2e325003652cbca0420068 100644 (file)
@@ -321,7 +321,7 @@ getRoundRobinParent(HttpRequest * request)
             if (p->weight == q->weight) {
                 if (q->rr_count < p->rr_count)
                     continue;
-            } else if ( (double) q->rr_count / q->weight < (double) p->rr_count / p->weight) {
+            } else if ( ((double) q->rr_count / q->weight) < ((double) p->rr_count / p->weight)) {
                 continue;
             }
         }