]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Prevent external_acl.cc "inBackground" assertion on queue overloads.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 24 Apr 2013 21:22:39 +0000 (15:22 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 24 Apr 2013 21:22:39 +0000 (15:22 -0600)
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.

src/external_acl.cc

index 0d41b8e700ef8e9bc0ff26f1c5cdf3f6c81d9506..91e2075a4d6deecf1fd6736705ddd940ae36be51 100644 (file)
@@ -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.");