void
SourceDomainLookup::checkForAsync(ACLChecklist *checklist) const
{
- checklist->asyncInProgress(true);
fqdncache_nbgethostbyaddr(Filled(checklist)->src_addr, LookupDone, checklist);
}
SourceDomainLookup::LookupDone(const char *fqdn, const DnsLookupDetails &details, void *data)
{
ACLFilledChecklist *checklist = Filled((ACLChecklist*)data);
- assert (checklist->asyncState() == SourceDomainLookup::Instance());
-
- checklist->asyncInProgress(false);
- checklist->changeState (ACLChecklist::NullState::Instance());
checklist->markSourceDomainChecked();
checklist->request->recordLookup(details);
- checklist->matchNonBlocking();
+ checklist->resumeNonBlockingCheck(SourceDomainLookup::Instance());
}
int
} else if (!checklist->sourceDomainChecked()) {
/* FIXME: Using AclMatchedName here is not OO correct. Should find a way to the current acl */
debugs(28, 3, "aclMatchAcl: Can't yet compare '" << AclMatchedName << "' ACL for '" << checklist->src_addr << "'");
- checklist->changeState(SourceDomainLookup::Instance());
- return 0;
+ if (checklist->goAsync(SourceDomainLookup::Instance()))
+ return -1;
+ // else fall through to "none" match, hiding the lookup failure (XXX)
}
return data->match("none");