]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
be more flexible in storeComplete(). instead of asserting that store_status
authorwessels <>
Tue, 12 Jan 1999 23:22:16 +0000 (23:22 +0000)
committerwessels <>
Tue, 12 Jan 1999 23:22:16 +0000 (23:22 +0000)
is STORE_PENDING, if its not, assert that the entry was aborted and
there are zero clients.

src/store.cc

index a9fe594f9a7f1c982efdb78b46b68906f882b8a0..c61f2cf481bb28639d1173d82d628d881c6d97ea 100644 (file)
@@ -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);