]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/AccessCheck.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / AccessCheck.cc
index 19ee86346bce58c48c7965165cd14aeb60e35464..51d8d53b4cc3e66a82251567927ad7f35fb279da 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #include "squid.h"
 #include "AccessLogEntry.h"
 #include "acl/FilledChecklist.h"
@@ -37,9 +45,9 @@ Adaptation::AccessCheck::Start(Method method, VectPoint vp,
 
 Adaptation::AccessCheck::AccessCheck(const ServiceFilter &aFilter,
                                      Adaptation::Initiator *initiator):
-        AsyncJob("AccessCheck"), filter(aFilter),
-        theInitiator(initiator),
-        acl_checklist(NULL)
+    AsyncJob("AccessCheck"), filter(aFilter),
+    theInitiator(initiator),
+    acl_checklist(NULL)
 {
 #if ICAP_CLIENT
     Adaptation::Icap::History::Pointer h = filter.request->icapHistory();
@@ -131,7 +139,7 @@ Adaptation::AccessCheck::checkCandidates()
             return;
         }
 
-        candidates.shift(); // the rule apparently went away (reconfigure)
+        candidates.erase(candidates.begin()); // the rule apparently went away (reconfigure)
     }
 
     debugs(93, 4, HERE << "NO candidates left");
@@ -176,7 +184,7 @@ Adaptation::AccessCheck::noteAnswer(allow_t answer)
     }
 
     // no match or the group disappeared during reconfiguration
-    candidates.shift();
+    candidates.erase(candidates.begin());
     checkCandidates();
 }
 
@@ -228,3 +236,4 @@ Adaptation::AccessCheck::isCandidate(AccessRule &r)
     debugs(93,7,HERE << r.groupId << (wants ? " wants" : " ignores"));
     return wants;
 }
+