From: wessels <> Date: Sat, 1 Feb 1997 05:06:30 +0000 (+0000) Subject: more Round Robin stuff X-Git-Tag: SQUID_3_0_PRE1~5157 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c8177e6d3efd4782bbf51a7c51629ed9c3fc20c;p=thirdparty%2Fsquid.git more Round Robin stuff --- diff --git a/src/neighbors.cc b/src/neighbors.cc index 401ab3dae2..49c810c730 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -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; diff --git a/src/ssl.cc b/src/ssl.cc index a948d1e46e..369d1b16dc 100644 --- a/src/ssl.cc +++ b/src/ssl.cc @@ -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); } diff --git a/src/tunnel.cc b/src/tunnel.cc index 9a8377ee5b..03e768a826 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -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); }