oops. :)
----- Forwarded message from Steven Wilton <steven.wilton@team.eftel.com> -----
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Tue, 21 May 2002 14:06:54 +0800
To: adrian@creative.net.au
From: Steven Wilton <steven.wilton@team.eftel.com>
Subject: WCCP Patch (update)
Adrian,
I'm not sure if you looked at the previous patch yet, but the attached
patch is actually correct (the other would not compile, missing a ')' ).
Steven
--- squid-2.4.4/src/wccp.c.old Wed May 15 09:07:45 2002
+++ squid-2.4.4/src/wccp.c Mon May 20 09:40:22 2002
@@ -84,6 +84,7 @@
static struct wccp_here_i_am_t wccp_here_i_am;
static struct wccp_i_see_you_t wccp_i_see_you;
static int change;
+static int number_caches;
static struct in_addr local_ip;
static PF wccpHandleUdp;
@@ -233,7 +234,7 @@
return;
if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU)
return;
- if (!change) {
+ if ((!change) && (number_caches == ntohl(wccp_i_see_you.number)) ) {
change = wccp_i_see_you.change;
return;
}
@@ -278,7 +279,6 @@
char *buckets;
int buckets_per_cache;
int loop;
- int number_caches;
int bucket = 0;
int *caches;
int cache_len;
@@ -311,6 +311,9 @@
assert(bucket < WCCP_BUCKETS);
buckets[bucket++] = loop;
}
+ }
+ while(bucket < WCCP_BUCKETS ) {
+ buckets[bucket++] = number_caches-1;
}
wccp_assign_bucket->type = htonl(WCCP_ASSIGN_BUCKET);
wccp_assign_bucket->id = wccp_i_see_you.id;
----- End forwarded message -----
-- Adrian Chadd "I'm really not a very complex person, <adrian@creative.net.au> I like to deal with situations by kicking people" - Ashley PenneyReceived on Tue May 21 2002 - 00:23:50 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:29 MST