]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Prevent external_acl.cc "inBackground" assertion on queue overloads.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 25 Apr 2013 15:47:40 +0000 (09:47 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Apr 2013 15:47:40 +0000 (09:47 -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 b9cb7d19d841274f875386eca8c84578495e9899..55f2ddf17aacf180bbd0812715c0825d6d55d0d0 100644 (file)
@@ -839,7 +839,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.");