]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
more Round Robin stuff
authorwessels <>
Sat, 1 Feb 1997 05:06:30 +0000 (05:06 +0000)
committerwessels <>
Sat, 1 Feb 1997 05:06:30 +0000 (05:06 +0000)
src/neighbors.cc
src/ssl.cc
src/tunnel.cc

index 401ab3dae2357fd1d4f154abad9f65d5b011ca3e..49c810c7308f3278324e22d1f19f489971fce02a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.107 1997/01/31 21:03:10 wessels Exp $
+ * $Id: neighbors.cc,v 1.108 1997/01/31 22:06:30 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -279,9 +279,13 @@ getRoundRobinParent(request_t * request)
     edge *e;
     edge *f = NULL;
     for (e = friends.edges_head; e; e = e->next) {
+       if (!BIT_TEST(e->options, NEIGHBOR_ROUNDROBIN))
+           continue;
+       if (neighborType(e, request) != EDGE_PARENT)
+           continue;
        if (!neighborUp(e))
            continue;
-       if (!BIT_TEST(e->options, NEIGHBOR_ROUNDROBIN))
+       if (!edgeWouldBePinged(e, request))
            continue;
        if (f && f->rr_count < e->rr_count)
            continue;
index a948d1e46e12f553a04fe71193da8c3e92742453..369d1b16dc23d250264a0d07983a033a6c2ed8b0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl.cc,v 1.33 1997/01/31 21:34:53 wessels Exp $
+ * $Id: ssl.cc,v 1.34 1997/01/31 22:06:31 wessels Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -502,6 +502,8 @@ sslSelectNeighbor(int fd, const ipcache_addrs * ia, void *data)
        hierarchyNote(request, HIER_DEFAULT_PARENT, 0, e->host);
     } else if ((e = getSingleParent(request))) {
        hierarchyNote(request, HIER_SINGLE_PARENT, 0, e->host);
+    } else if ((e = getRoundRobinParent(request))) {
+       hierarchyNote(request, HIER_ROUNDROBIN_PARENT, 0, e->host);
     } else if ((e = getFirstUpParent(request))) {
        hierarchyNote(request, HIER_FIRSTUP_PARENT, 0, e->host);
     }
index 9a8377ee5b83edba9542d61b4d4f0f73356d0257..03e768a82655f37a5c7a645f8de8c41a301587ff 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tunnel.cc,v 1.33 1997/01/31 21:34:53 wessels Exp $
+ * $Id: tunnel.cc,v 1.34 1997/01/31 22:06:31 wessels Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -502,6 +502,8 @@ sslSelectNeighbor(int fd, const ipcache_addrs * ia, void *data)
        hierarchyNote(request, HIER_DEFAULT_PARENT, 0, e->host);
     } else if ((e = getSingleParent(request))) {
        hierarchyNote(request, HIER_SINGLE_PARENT, 0, e->host);
+    } else if ((e = getRoundRobinParent(request))) {
+       hierarchyNote(request, HIER_ROUNDROBIN_PARENT, 0, e->host);
     } else if ((e = getFirstUpParent(request))) {
        hierarchyNote(request, HIER_FIRSTUP_PARENT, 0, e->host);
     }