]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ACLDomainData.cc
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / src / ACLDomainData.cc
index fbc8d0e964541abaf41d6d887ca699a8a7490b3b..508cb2a0ec2bcc319b9c198ce5948aecdab8bf79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLDomainData.cc,v 1.8 2004/12/20 14:52:24 robertc Exp $
+ * $Id$
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -38,6 +38,7 @@
 #include "ACLDomainData.h"
 #include "authenticate.h"
 #include "ACLChecklist.h"
+#include "wordlist.h"
 
 template<class T>
 inline void
@@ -99,9 +100,9 @@ aclDomainCompare(T const &a, T const &b)
 
     /* FIXME this warning may display d1 and d2 when it should display d3 and d4 */
     if (ret == 0) {
-        debug(28, 0) ("WARNING: '%s' is a subdomain of '%s'\n", d1, d2);
-        debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", (char *) a);
-        debug(28, 0) ("WARNING: You should probably remove '%s' from the ACL named '%s'\n", d1, AclMatchedName);
+        debugs(28, 0, "WARNING: '" << d1 << "' is a subdomain of '" << d2 << "'");
+        debugs(28, 0, "WARNING: because of this '" << (char *) a << "' is ignored to keep splay tree searching predictable");
+        debugs(28, 0, "WARNING: You should probably remove '" << d1 << "' from the ACL named '" << AclMatchedName << "'");
     }
 
     return ret;
@@ -113,12 +114,11 @@ ACLDomainData::match(char const *host)
     if (host == NULL)
         return 0;
 
-    debug(28, 3) ("aclMatchDomainList: checking '%s'\n", host);
+    debugs(28, 3, "aclMatchDomainList: checking '" << host << "'");
 
     domains = domains->splay((char *)host, aclHostDomainCompare);
 
-    debug(28, 3) ("aclMatchDomainList: '%s' %s\n",
-                  host, splayLastResult ? "NOT found" : "found");
+    debugs(28, 3, "aclMatchDomainList: '" << host << "' " << (splayLastResult ? "NOT found" : "found"));
 
     return !splayLastResult;
 }
@@ -153,6 +153,12 @@ ACLDomainData::parse()
     }
 }
 
+bool
+ACLDomainData::empty() const
+{
+    return domains->empty();
+}
+
 
 ACLData<char const *> *
 ACLDomainData::clone() const