--------------------- PatchSet 5563 Date: 2002/12/23 00:13:27 Author: ymc Branch: dsa Tag: (none) Log: fixed a mime.c bug. It should allow storeSwapOutFileClosed to do storeHashInsert Members: src/client_side.c:1.5.2.9.2.8->1.5.2.9.2.9 src/mime.c:1.3.4.3.10.4->1.3.4.3.10.5 src/store.c:1.4.4.5.6.14->1.4.4.5.6.15 src/store_client.c:1.4.4.1.8.3->1.4.4.1.8.4 src/store_key_md5.c:1.4.4.1->1.4.4.1.6.1 src/store_swapout.c:1.4.4.2.4.10->1.4.4.2.4.11 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.5.2.9.2.8 retrieving revision 1.5.2.9.2.9 diff -u -r1.5.2.9.2.8 -r1.5.2.9.2.9 --- squid/src/client_side.c 15 Dec 2002 10:29:40 -0000 1.5.2.9.2.8 +++ squid/src/client_side.c 23 Dec 2002 00:13:27 -0000 1.5.2.9.2.9 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.5.2.9.2.8 2002/12/15 10:29:40 ymc Exp $ + * $Id: client_side.c,v 1.5.2.9.2.9 2002/12/23 00:13:27 ymc Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2501,7 +2501,7 @@ http->sc = storeClientListAdd(http->entry->p, http); #else if (NULL != http->entry) { - storeLockObject(http->entry->p); + storeLockObject(http->entry); storeCreateMemObject(http->entry, http->uri, http->log_uri); http->entry->mem_obj->method = r->method; http->sc = storeClientListAdd(http->entry, http); Index: squid/src/mime.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/mime.c,v retrieving revision 1.3.4.3.10.4 retrieving revision 1.3.4.3.10.5 diff -u -r1.3.4.3.10.4 -r1.3.4.3.10.5 --- squid/src/mime.c 7 Dec 2002 06:51:26 -0000 1.3.4.3.10.4 +++ squid/src/mime.c 23 Dec 2002 00:13:28 -0000 1.3.4.3.10.5 @@ -1,6 +1,6 @@ /* - * $Id: mime.c,v 1.3.4.3.10.4 2002/12/07 06:51:26 ymc Exp $ + * $Id: mime.c,v 1.3.4.3.10.5 2002/12/23 00:13:28 ymc Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -470,7 +470,7 @@ if (p == NULL) { EBIT_CLR(e->p->flags, KEY_PRIVATE); e->p->hash.key = storeKeyDup(digest); - storeHashInsert(e->p); +// storeHashInsert(e->p); EBIT_SET(e->flags, ENTRY_SPECIAL); EBIT_SET(e->p->flags, ENTRY_SPECIAL); storeBufferFlush(e->p); Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.4.4.5.6.14 retrieving revision 1.4.4.5.6.15 diff -u -r1.4.4.5.6.14 -r1.4.4.5.6.15 --- squid/src/store.c 15 Dec 2002 21:27:18 -0000 1.4.4.5.6.14 +++ squid/src/store.c 23 Dec 2002 00:13:28 -0000 1.4.4.5.6.15 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.4.4.5.6.14 2002/12/15 21:27:18 ymc Exp $ + * $Id: store.c,v 1.4.4.5.6.15 2002/12/23 00:13:28 ymc Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -154,6 +154,13 @@ storeRelease(StoreEntry * p) { // assert(p->instances); +/* + if (EBIT_TEST(p->flags, KEY_PRIVATE)) + assert(p->hash.key == NULL); + else + */ + if (!EBIT_TEST(p->flags, KEY_PRIVATE)) + assert(p->hash.key); debug(20, 3) ("storeRelease: Releasing: '%s'\n", storeKeyText(p->hash.key)); /* If, for any reason we can't discard this object because of an * outstanding request, mark it for pending release */ @@ -357,6 +364,7 @@ { #ifdef DSA StoreEntry * p = storeGet(e->hash.key); + EBIT_SET(e->flags, KEY_PRIVATE); if (p == e) /* only remove hash entry from table in DSA miss */ #endif Index: squid/src/store_client.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v retrieving revision 1.4.4.1.8.3 retrieving revision 1.4.4.1.8.4 diff -u -r1.4.4.1.8.3 -r1.4.4.1.8.4 --- squid/src/store_client.c 2 Dec 2002 08:11:21 -0000 1.4.4.1.8.3 +++ squid/src/store_client.c 23 Dec 2002 00:13:28 -0000 1.4.4.1.8.4 @@ -1,6 +1,6 @@ /* - * $Id: store_client.c,v 1.4.4.1.8.3 2002/12/02 08:11:21 ymc Exp $ + * $Id: store_client.c,v 1.4.4.1.8.4 2002/12/23 00:13:28 ymc Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -187,6 +187,8 @@ STCB * callback, void *data) { + if (!EBIT_TEST(e->flags, KEY_PRIVATE)) + assert(e->hash.key); assert(!EBIT_TEST(e->flags, ENTRY_ABORTED)); debug(20, 3) ("storeClientCopy: %s, seen %d, want %d, size %d, cb %p, cbdata %p\n", storeKeyText(e->hash.key), Index: squid/src/store_key_md5.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_key_md5.c,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.1.6.1 diff -u -r1.4.4.1 -r1.4.4.1.6.1 --- squid/src/store_key_md5.c 15 Jan 2001 22:49:20 -0000 1.4.4.1 +++ squid/src/store_key_md5.c 23 Dec 2002 00:13:28 -0000 1.4.4.1.6.1 @@ -1,6 +1,6 @@ /* - * $Id: store_key_md5.c,v 1.4.4.1 2001/01/15 22:49:20 hno Exp $ + * $Id: store_key_md5.c,v 1.4.4.1.6.1 2002/12/23 00:13:28 ymc Exp $ * * DEBUG: section 20 Storage Manager MD5 Cache Keys * AUTHOR: Duane Wessels @@ -153,6 +153,7 @@ int storeKeyNull(const cache_key * key) { + assert(key); if (memcmp(key, null_key, MD5_DIGEST_CHARS) == 0) return 1; else Index: squid/src/store_swapout.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_swapout.c,v retrieving revision 1.4.4.2.4.10 retrieving revision 1.4.4.2.4.11 diff -u -r1.4.4.2.4.10 -r1.4.4.2.4.11 --- squid/src/store_swapout.c 15 Dec 2002 21:27:18 -0000 1.4.4.2.4.10 +++ squid/src/store_swapout.c 23 Dec 2002 00:13:28 -0000 1.4.4.2.4.11 @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.c,v 1.4.4.2.4.10 2002/12/15 21:27:18 ymc Exp $ + * $Id: store_swapout.c,v 1.4.4.2.4.11 2002/12/23 00:13:28 ymc Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -322,8 +322,9 @@ storeDirSwapLog(e, SWAP_LOG_ADD); storeAddInstanceEntry(e, entry); } - else if (p == e) { + else if (p == e) { /* This is the case when HEAD has MD5 and we finish download */ + assert(0); // shoudn't happen in DSA version storeLog(STORE_LOG_SWAPOUT, e); storeDirSwapLog(e, SWAP_LOG_ADD); storeAddInstanceEntry(e, entry);