From: Alex Rousskov Date: Wed, 24 Apr 2013 21:22:39 +0000 (-0600) Subject: Prevent external_acl.cc "inBackground" assertion on queue overloads. X-Git-Tag: SQUID_3_4_0_1~186 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1e22df05e7f2ec76b6128d33104e16570ed82c0;p=thirdparty%2Fsquid.git Prevent external_acl.cc "inBackground" assertion on queue overloads. The enqueue check for external ACL lookups was inconsistent with the final queue length check in ExternalACLLookup::Start(). The former allowed adding to the already full (but not yet overflowing) queue while the latter rightfully(?) asserted that the queue should not overflow. --- diff --git a/src/external_acl.cc b/src/external_acl.cc index 0d41b8e700..91e2075a4d 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -845,7 +845,7 @@ aclMatchExternal(external_acl_data *acl, ACLFilledChecklist *ch) debugs(82, 2, HERE << "\"" << key << "\": entry=@" << entry << ", age=" << (entry ? (long int) squid_curtime - entry->date : 0)); - if (acl->def->theHelper->stats.queue_size <= (int)acl->def->theHelper->childs.n_active) { + if (acl->def->theHelper->stats.queue_size < (int)acl->def->theHelper->childs.n_active) { debugs(82, 2, HERE << "\"" << key << "\": queueing a call."); ch->changeState(ExternalACLLookup::Instance()); debugs(82, 2, HERE << "\"" << key << "\": return -1.");