From: wessels <> Date: Tue, 12 Jan 1999 23:22:16 +0000 (+0000) Subject: be more flexible in storeComplete(). instead of asserting that store_status X-Git-Tag: SQUID_3_0_PRE1~2422 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6403fac093805f97174b3c7657cddbc935fab84;p=thirdparty%2Fsquid.git be more flexible in storeComplete(). instead of asserting that store_status is STORE_PENDING, if its not, assert that the entry was aborted and there are zero clients. --- diff --git a/src/store.cc b/src/store.cc index a9fe594f9a..c61f2cf481 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.478 1999/01/12 15:47:56 wessels Exp $ + * $Id: store.cc,v 1.479 1999/01/12 16:22:16 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -561,7 +561,15 @@ void storeComplete(StoreEntry * e) { debug(20, 3) ("storeComplete: '%s'\n", storeKeyText(e->key)); - assert(e->store_status == STORE_PENDING); + if (e->store_status != STORE_PENDING) { + /* + * if we're not STORE_PENDING, then probably we got aborted + * and there should be NO clients on this entry + */ + assert(EBIT_TEST(entry->flags, ENTRY_ABORTED)); + assert(entry->mem_obj->nclients == 0); + return; + } e->mem_obj->object_sz = e->mem_obj->inmem_hi; e->store_status = STORE_OK; assert(e->mem_status == NOT_IN_MEMORY);