]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1984: assertion failed: ACLChecklist.cc:172: "A"
authorhno <>
Thu, 19 Jul 2007 06:37:05 +0000 (06:37 +0000)
committerhno <>
Thu, 19 Jul 2007 06:37:05 +0000 (06:37 +0000)
and add back a more reliable early termination check, terminating the
acl lookup on resume from async lookup if the caller is gone (invalid)

src/ACLChecklist.cc
src/ACLChecklist.h

index c0fdb3a7d2a747fa1518643972d5f6d0c964e311..54b2550a0a55bd117132a694bc84a209c64977ef 100644 (file)
@@ -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
index 36044c08b3f0cba14f046991da95329d5fd26cdc..e86df0f82f25fa4a8b0876623891b728a5c277d5 100644 (file)
@@ -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; }