1 Index: squid/src/neighbors.c
2 diff -c squid/src/neighbors.c:1.299.2.2 squid/src/neighbors.c:1.299.2.3
3 *** squid/src/neighbors.c:1.299.2.2 Tue Aug 27 22:41:16 2002
4 --- squid/src/neighbors.c Tue Aug 12 18:28:19 2003
9 int parent_timeout = 0, parent_exprep = 0;
10 int sibling_timeout = 0, sibling_exprep = 0;
11 + int mcast_timeout = 0, mcast_exprep = 0;
13 if (Config.peers == NULL)
17 * says a multicast peer is dead.
19 p->stats.last_reply = squid_curtime;
20 ! (*exprep) += p->mcast.n_replies_expected;
21 } else if (neighborUp(p)) {
22 /* its alive, expect a reply from it */
23 if (neighborType(p, request) == PEER_PARENT) {
25 * says a multicast peer is dead.
27 p->stats.last_reply = squid_curtime;
28 ! mcast_exprep += p->mcast.n_replies_expected;
29 ! mcast_timeout += (p->stats.rtt * p->mcast.n_replies_expected);
30 } else if (neighborUp(p)) {
31 /* its alive, expect a reply from it */
32 if (neighborType(p, request) == PEER_PARENT) {
36 * How many replies to expect?
38 ! *exprep = parent_exprep + sibling_exprep;
41 * If there is a configured timeout, use it
44 * How many replies to expect?
46 ! *exprep = parent_exprep + sibling_exprep + mcast_exprep;
49 * If there is a configured timeout, use it
55 *timeout = 2 * parent_timeout / parent_exprep;
56 + else if (mcast_exprep)
57 + *timeout = 2 * mcast_timeout / mcast_exprep;
59 *timeout = 2 * sibling_timeout / sibling_exprep;