From ef689e2bf413ae58ed57db4bf1b05b685e4c61e3 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Tue, 28 May 2013 08:45:02 -0600 Subject: [PATCH] Simplified prepNonBlocking() to address an XXX: Moved finished() check to resumeNonBlockingCheck(). --- src/acl/Checklist.cc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/acl/Checklist.cc b/src/acl/Checklist.cc index 6774c738e9..d5e612778c 100644 --- a/src/acl/Checklist.cc +++ b/src/acl/Checklist.cc @@ -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 -- 2.47.2