]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Simplified prepNonBlocking() to address an XXX: Moved finished() check to
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 28 May 2013 14:45:02 +0000 (08:45 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 28 May 2013 14:45:02 +0000 (08:45 -0600)
resumeNonBlockingCheck().

src/acl/Checklist.cc

index 6774c738e9326e4999201e6996bc761dc82d207b..d5e612778ccc1eae24e0f6a64f0021ee6c4171e4 100644 (file)
@@ -31,19 +31,7 @@ ACLChecklist::prepNonBlocking()
         return false;
     }
 
-    // If doNonBlocking() was called for a finished() checklist to call
-    // the callbacks, then do not try to match again. XXX: resumeNonBlockingCheck() should check for this instead.
-    if (!finished())
-        return true;
-
-    /** \par
-     * Either the request is allowed, denied, requires authentication.
-     */
-    debugs(28, 3, this << " calling back with " << currentAnswer());
-    cbdataReferenceDone(accessList); /* A */
-    checkCallback(currentAnswer());
-    /* From here on in, this may be invalid */
-    return false;
+    return true;
 }
 
 void
@@ -265,7 +253,8 @@ ACLChecklist::resumeNonBlockingCheck(AsyncState *state)
     if (!prepNonBlocking())
         return; // checkCallback() has been called
 
-    matchAndFinish();
+    if (!finished())
+        matchAndFinish();
 
     if (asyncInProgress())
         assert(!matchPath.empty()); // we have breadcrumbs to resume matching