From: hno <> Date: Thu, 19 Jul 2007 06:37:05 +0000 (+0000) Subject: Bug #1984: assertion failed: ACLChecklist.cc:172: "A" X-Git-Tag: SQUID_3_0_PRE7~164 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=315b856d1d9d7fd9c50dfefdb9027740304f8a2a;p=thirdparty%2Fsquid.git Bug #1984: assertion failed: ACLChecklist.cc:172: "A" and add back a more reliable early termination check, terminating the acl lookup on resume from async lookup if the caller is gone (invalid) --- diff --git a/src/ACLChecklist.cc b/src/ACLChecklist.cc index c0fdb3a7d2..54b2550a0a 100644 --- a/src/ACLChecklist.cc +++ b/src/ACLChecklist.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLChecklist.cc,v 1.40 2007/07/19 00:35:27 hno Exp $ + * $Id: ACLChecklist.cc,v 1.41 2007/07/19 00:37:05 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -128,6 +128,11 @@ ACLChecklist::check() /* deny if no rules present */ currentAnswer(ACCESS_DENIED); + if (callerGone()) { + checkCallback(currentAnswer()); + return; + } + /* NOTE: This holds a cbdata reference to the current access_list * entry, not the whole list. */ @@ -580,6 +585,12 @@ aclChecklistCreate(const acl_access * A, HttpRequest * request, const char *iden return checklist; } +bool +ACLChecklist::callerGone() +{ + return !cbdataReferenceValid(callback_data); +} + #ifndef _USE_INLINE_ #include "ACLChecklist.cci" #endif diff --git a/src/ACLChecklist.h b/src/ACLChecklist.h index 36044c08b3..e86df0f82f 100644 --- a/src/ACLChecklist.h +++ b/src/ACLChecklist.h @@ -1,6 +1,6 @@ /* - * $Id: ACLChecklist.h,v 1.26 2007/07/19 00:35:27 hno Exp $ + * $Id: ACLChecklist.h,v 1.27 2007/07/19 00:37:05 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -155,6 +155,7 @@ private: void checking (bool const); bool lastACLResult_; + bool callerGone(); public: bool lastACLResult(bool x) { return lastACLResult_ = x; }