--------------------- PatchSet 6104 Date: 2003/12/29 00:49:44 Author: ymc Branch: dsa Tag: (none) Log: fixed storeAddInstanceEntry Members: src/store.c:1.4.4.5.6.16->1.4.4.5.6.17 Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.4.4.5.6.16 retrieving revision 1.4.4.5.6.17 diff -u -r1.4.4.5.6.16 -r1.4.4.5.6.17 --- squid/src/store.c 23 Dec 2002 21:10:36 -0000 1.4.4.5.6.16 +++ squid/src/store.c 29 Dec 2003 00:49:44 -0000 1.4.4.5.6.17 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.4.4.5.6.16 2002/12/23 21:10:36 ymc Exp $ + * $Id: store.c,v 1.4.4.5.6.17 2003/12/29 00:49:44 ymc Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -735,14 +735,14 @@ /* return if the entry is already added */ if (EBIT_TEST(e->flags, ENTRY_CACHABLE)) return; - if (e->p->instances->count > 0) { - for (i = 0; i < e->p->instances->count; ++i) { - if (e->p->instances->items[i] == e) break; - } - if (i == e->p->instances->count) arrayAppend(e->p->instances, e); + if (p->instances->count > 0) { + for (i = 0; i < p->instances->count; ++i) { + if (p->instances->items[i] == e) break; + } + if (i == p->instances->count) arrayAppend(p->instances, e); } else - arrayAppend(e->p->instances, e); + arrayAppend(p->instances, e); EBIT_SET(e->flags, ENTRY_CACHABLE); // e->p = p; xmemcpy(key, p->hash.key, MD5_DIGEST_CHARS);