This change looks suspicious to me:
@@ -199,11 +199,15 @@
static void
ipcacheAddEntry(ipcache_entry * i)
{
- hash_link *e = hash_lookup(ip_table, i->hash.key);
+ ipcache_entry *e = (ipcache_entry *) hash_lookup(ip_table, i->hash.key);
if (NULL != e) {
- /* avoid colission */
- ipcache_entry *q = (ipcache_entry *) e;
- ipcacheRelease(q);
+ /* avoid collision */
+ if (i->flags.negcached && !e->flags.negcached && e->expires > squid_curtime) {
+ /* Don't waste good information */
+ ipcacheFreeEntry(i);
+ return;
+ }
+ ipcacheRelease(e);
}
hash_join(ip_table, &i->hash);
dlinkAdd(i, &i->lru, &lru_list);
Previously we were freeing e (aka q), but now we are freeing i, then inserting
it into ip_table?
DW
Received on Thu Feb 12 2004 - 00:21:31 MST
This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:04 MST