--------------------- PatchSet 5495 Date: 2002/11/18 05:44:13 Author: ymc Branch: dsa Tag: (none) Log: fixed up storeSwapMEtaBuild and instanceSwapMetaBuild Members: src/store_swapmeta.c:1.4.4.2.6.1->1.4.4.2.6.2 Index: squid/src/store_swapmeta.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_swapmeta.c,v retrieving revision 1.4.4.2.6.1 retrieving revision 1.4.4.2.6.2 diff -u -r1.4.4.2.6.1 -r1.4.4.2.6.2 --- squid/src/store_swapmeta.c 15 Nov 2002 09:10:37 -0000 1.4.4.2.6.1 +++ squid/src/store_swapmeta.c 18 Nov 2002 05:44:13 -0000 1.4.4.2.6.2 @@ -1,6 +1,6 @@ /* - * $Id: store_swapmeta.c,v 1.4.4.2.6.1 2002/11/15 09:10:37 ymc Exp $ + * $Id: store_swapmeta.c,v 1.4.4.2.6.2 2002/11/18 05:44:13 ymc Exp $ * * DEBUG: section 20 Storage Manager Swapfile Metadata * AUTHOR: Kostas Anagnostakis @@ -66,18 +66,21 @@ { tlv *TLV = NULL; /* we'll return this */ tlv **T = &TLV; +#ifdef DSA + assert(e->mem_obj != NULL); + assert(e->swap_status == SWAPOUT_WRITING); + T = storeSwapTLVAdd(STORE_META_KEY, e->hash.key, MD5_DIGEST_CHARS, T); + T = storeSwapTLVAdd(STORE_META_STD, &e->lastref, STORE_HDR_METASIZE, T); +#else const char *url; assert(e->mem_obj != NULL); assert(e->swap_status == SWAPOUT_WRITING); url = storeUrl(e); debug(20, 3) ("storeSwapMetaBuild: %s\n", url); T = storeSwapTLVAdd(STORE_META_KEY, e->hash.key, MD5_DIGEST_CHARS, T); -#ifdef DSA - T = storeSwapTLVAdd(STORE_META_STD, &e->lastref, STORE_HDR_METASIZE, T); -#else T = storeSwapTLVAdd(STORE_META_STD, &e->timestamp, STORE_HDR_METASIZE, T); -#endif T = storeSwapTLVAdd(STORE_META_URL, url, strlen(url) + 1, T); +#endif return TLV; } @@ -171,7 +174,7 @@ assert(e->p->mem_obj != NULL); debug(20, 3) ("storeSwapMetaBuild: %s\n", url); T = storeSwapTLVAdd(STORE_META_KEY, e->hash.key, MD5_DIGEST_CHARS, T); - T = storeSwapTLVAdd(STORE_META_STD, &e->timestamp, STORE_HDR_METASIZE, T); + T = storeSwapTLVAdd(STORE_META_STD, &e->timestamp, INSTANCE_HDR_METASIZE, T); T = storeSwapTLVAdd(STORE_META_URL, url, strlen(url) + 1, T); return TLV; }