]>
Commit | Line | Data |
---|---|---|
d3969417 AM |
1 | Index: squid/src/wccp.c |
2 | diff -c squid/src/wccp.c:1.19.2.4 squid/src/wccp.c:1.19.2.5 | |
3 | *** squid/src/wccp.c:1.19.2.4 Sun Sep 1 09:17:09 2002 | |
4 | --- squid/src/wccp.c Thu Oct 24 12:51:14 2002 | |
5 | *************** | |
6 | *** 84,89 **** | |
7 | --- 84,90 ---- | |
8 | static struct wccp_here_i_am_t wccp_here_i_am; | |
9 | static struct wccp_i_see_you_t wccp_i_see_you; | |
10 | static int change; | |
11 | + static int last_assign_buckets_change; | |
12 | static int number_caches; | |
13 | static struct in_addr local_ip; | |
14 | ||
15 | *************** | |
16 | *** 109,114 **** | |
17 | --- 110,116 ---- | |
18 | wccp_here_i_am.version = htonl(Config.Wccp.version); | |
19 | wccp_here_i_am.revision = htonl(WCCP_REVISION); | |
20 | change = 0; | |
21 | + last_assign_buckets_change = 0; | |
22 | if (Config.Wccp.router.s_addr != any_addr.s_addr) | |
23 | if (!eventFind(wccpHereIam, NULL)) | |
24 | eventAdd("wccpHereIam", wccpHereIam, NULL, 5.0, 1); | |
25 | *************** | |
26 | *** 243,256 **** | |
27 | return; | |
28 | if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU) | |
29 | return; | |
30 | ! if ((!change) && (number_caches == ntohl(wccp_i_see_you.number))) { | |
31 | ! change = wccp_i_see_you.change; | |
32 | ! return; | |
33 | } | |
34 | if (change != wccp_i_see_you.change) { | |
35 | change = wccp_i_see_you.change; | |
36 | ! if (wccpLowestIP() && wccp_i_see_you.number) | |
37 | wccpAssignBuckets(); | |
38 | } | |
39 | } | |
40 | ||
41 | --- 245,272 ---- | |
42 | return; | |
43 | if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU) | |
44 | return; | |
45 | ! if ((0 == change) && (number_caches == ntohl(wccp_i_see_you.number))) { | |
46 | ! if (last_assign_buckets_change == wccp_i_see_you.change) { | |
47 | ! /* | |
48 | ! * After a WCCP_ASSIGN_BUCKET message, the router should | |
49 | ! * update the change value. If not, maybe the route didn't | |
50 | ! * receive our WCCP_ASSIGN_BUCKET message, so send it again. | |
51 | ! * | |
52 | ! * Don't update change here. Instead, fall through to | |
53 | ! * the next block to call wccpAssignBuckets() again. | |
54 | ! */ | |
55 | ! (void) 0; | |
56 | ! } else { | |
57 | ! change = wccp_i_see_you.change; | |
58 | ! return; | |
59 | ! } | |
60 | } | |
61 | if (change != wccp_i_see_you.change) { | |
62 | change = wccp_i_see_you.change; | |
63 | ! if (wccpLowestIP() && wccp_i_see_you.number) { | |
64 | ! last_assign_buckets_change = change; | |
65 | wccpAssignBuckets(); | |
66 | + } | |
67 | } | |
68 | } | |
69 |