From: wessels <> Date: Fri, 11 Sep 1998 01:48:55 +0000 (+0000) Subject: further safegurads in httpMaybeRemovePublic. return if the key X-Git-Tag: SQUID_3_0_PRE1~2748 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9dc1202d2e364bf2fd9b707374f899ca222a04bf;p=thirdparty%2Fsquid.git further safegurads in httpMaybeRemovePublic. return if the key is PUBLIC, and assert that we don't remove the "current" entry. --- diff --git a/src/http.cc b/src/http.cc index 720574c0fd..73b0bfd7e5 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.315 1998/09/10 19:45:53 wessels Exp $ + * $Id: http.cc,v 1.316 1998/09/10 19:48:55 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -134,6 +134,8 @@ httpMaybeRemovePublic(StoreEntry * e, http_status status) int remove = 0; const cache_key *key; StoreEntry *pe; + if (!EBIT_TEST(e->flag, KEY_PRIVATE)) + return; switch (status) { case HTTP_OK: case HTTP_NON_AUTHORITATIVE_INFORMATION: @@ -161,6 +163,7 @@ httpMaybeRemovePublic(StoreEntry * e, http_status status) key = storeKeyPublic(e->mem_obj->url, e->mem_obj->method); if ((pe = storeGet(key)) == NULL) return; + assert(e != pe); storeRelease(pe); }