--------------------- PatchSet 468 Date: 2002/12/24 01:46:07 Author: rbcollins Branch: esi Tag: (none) Log: only set Release flag in one place Members: src/Store.h:1.3.2.1->1.3.2.2 src/store.cc:1.2.2.1->1.2.2.2 Index: squid3/src/Store.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Store.h,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -u -r1.3.2.1 -r1.3.2.2 --- squid3/src/Store.h 20 Dec 2002 21:55:54 -0000 1.3.2.1 +++ squid3/src/Store.h 24 Dec 2002 01:46:07 -0000 1.3.2.2 @@ -1,6 +1,6 @@ /* - * $Id: Store.h,v 1.3.2.1 2002/12/20 21:55:54 rbcollins Exp $ + * $Id: Store.h,v 1.3.2.2 2002/12/24 01:46:07 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -73,6 +73,7 @@ } void *operator new(size_t byteCount); void operator delete(void *address); + void setReleaseFlag(); #if ESI ESIElement::Pointer cachedESITree; #endif Index: squid3/src/store.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/store.cc,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- squid3/src/store.cc 20 Dec 2002 21:55:54 -0000 1.2.2.1 +++ squid3/src/store.cc 24 Dec 2002 01:46:07 -0000 1.2.2.2 @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.2.2.1 2002/12/20 21:55:54 rbcollins Exp $ + * $Id: store.cc,v 1.2.2.2 2002/12/24 01:46:07 rbcollins Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -312,12 +312,20 @@ } void +_StoreEntry::setReleaseFlag() +{ + if (EBIT_TEST(flags, RELEASE_REQUEST)) + return; + debug(20, 3) ("StoreEntry::setReleaseFlag: '%s'\n", getMD5Text()); + EBIT_SET(flags, RELEASE_REQUEST); +} + +void storeReleaseRequest(StoreEntry * e) { if (EBIT_TEST(e->flags, RELEASE_REQUEST)) return; - debug(20, 3) ("storeReleaseRequest: '%s'\n", e->getMD5Text()); - EBIT_SET(e->flags, RELEASE_REQUEST); + e->setReleaseFlag(); /* * Clear cachable flag here because we might get called before * anyone else even looks at the cachability flag. Also, this @@ -338,7 +346,7 @@ if (e->lock_count) return (int) e->lock_count; if (e->store_status == STORE_PENDING) - EBIT_SET(e->flags, RELEASE_REQUEST); + e->setReleaseFlag(); assert(storePendingNClients(e) == 0); if (EBIT_TEST(e->flags, RELEASE_REQUEST)) storeRelease(e); @@ -950,7 +958,7 @@ * we'll just call storeUnlockObject() on these. */ e->lock_count++; - EBIT_SET(e->flags, RELEASE_REQUEST); + e->setReleaseFlag(); stackPush(&LateReleaseStack, e); PROF_stop(storeRelease); return;