]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE3-multicast-ICP-timeout.patch
- updated to 2.5.STABLE13
[packages/squid.git] / squid-2.5.STABLE3-multicast-ICP-timeout.patch
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
5 ***************
6 *** 430,435 ****
7 --- 430,436 ----
8       int peers_pinged = 0;
9       int parent_timeout = 0, parent_exprep = 0;
10       int sibling_timeout = 0, sibling_exprep = 0;
11 +     int mcast_timeout = 0, mcast_exprep = 0;
12   
13       if (Config.peers == NULL)
14         return 0;
15 ***************
16 *** 490,496 ****
17              * says a multicast peer is dead.
18              */
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) {
24 --- 491,498 ----
25              * says a multicast peer is dead.
26              */
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) {
33 ***************
34 *** 551,557 ****
35       /*
36        * How many replies to expect?
37        */
38 !     *exprep = parent_exprep + sibling_exprep;
39   
40       /*
41        * If there is a configured timeout, use it
42 --- 553,559 ----
43       /*
44        * How many replies to expect?
45        */
46 !     *exprep = parent_exprep + sibling_exprep + mcast_exprep;
47   
48       /*
49        * If there is a configured timeout, use it
50 ***************
51 *** 562,567 ****
52 --- 564,571 ----
53         if (*exprep > 0) {
54             if (parent_exprep)
55                 *timeout = 2 * parent_timeout / parent_exprep;
56 +           else if (mcast_exprep)
57 +               *timeout = 2 * mcast_timeout / mcast_exprep;
58             else
59                 *timeout = 2 * sibling_timeout / sibling_exprep;
60         } else
This page took 0.045642 seconds and 3 git commands to generate.