From: wessels <> Date: Wed, 4 Jun 1997 02:09:45 +0000 (+0000) Subject: got a coredump from storeAbort because ping_status == PING_WAITING. X-Git-Tag: SQUID_3_0_PRE1~4953 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f39b81d87fbfc04c35c9879d50a4528a4ccdc27;p=thirdparty%2Fsquid.git got a coredump from storeAbort because ping_status == PING_WAITING. I'm not sure why its bad to abort an object in that state, so that check has been commented out. Also I don't think its necessary to set ENTRY_DISPATCHED anymore; there should be other checks in place for aborted entries. Also changed a bunch of debug_trap()'s to assertions. --- diff --git a/src/store.cc b/src/store.cc index 9ccd583f71..8bbf20d1e9 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.249 1997/06/02 05:39:50 wessels Exp $ + * $Id: store.cc,v 1.250 1997/06/03 20:09:45 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -1664,17 +1664,9 @@ storeAbort(StoreEntry * e, const char *msg) LOCAL_ARRAY(char, mime_hdr, 300); char *abort_msg; MemObject *mem = e->mem_obj; - - if (e->store_status != STORE_PENDING) { - debug_trap("storeAbort: bad store_status"); - return; - } else if (mem == NULL) { - debug_trap("storeAbort: null mem_obj"); - return; - } else if (e->ping_status == PING_WAITING) { - debug_trap("storeAbort: ping_status == PING_WAITING"); - return; - } + assert(e->store_status == STORE_PENDING); + assert(mem != NULL); + /*assert(ping_status != PING_WAITING);*/ debug(20, 6, "storeAbort: '%s'\n", e->key); storeNegativeCache(e); e->store_status = STORE_ABORTED; @@ -1682,11 +1674,6 @@ storeAbort(StoreEntry * e, const char *msg) /* No DISK swap for negative cached object */ e->swap_status = NO_SWAP; e->lastref = squid_curtime; - /* In case some parent responds late and - * tries to restart the fetch, say that it's been - * dispatched already. - */ - BIT_SET(e->flag, ENTRY_DISPATCHED); storeLockObject(e); /* Count bytes faulted through cache but not moved to disk */ HTTPCacheInfo->proto_touchobject(HTTPCacheInfo,