]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Deal with end-of-line comments in ACL definitions, such as used in the
authorhno <>
Thu, 11 Apr 2002 22:45:28 +0000 (22:45 +0000)
committerhno <>
Thu, 11 Apr 2002 22:45:28 +0000 (22:45 +0000)
default Safe_ports definition.

src/acl.cc

index 07b4cfab863da4bdd2838b7a13ed045a1e1d6a15..c309460cbc720214a596593053469b2c58b3964a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.271 2002/01/13 01:08:43 robertc Exp $
+ * $Id: acl.cc,v 1.272 2002/04/11 16:45:28 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -114,7 +114,9 @@ strtokFile(void)
   strtok_again:
     if (!aclFromFile) {
        t = (strtok(NULL, w_space));
-       if (t && (*t == '\"' || *t == '\'')) {
+       if (!t || *t == '#') {
+           return NULL;
+       } else if (*t == '\"' || *t == '\'') {
            /* quote found, start reading from file */
            fn = ++t;
            while (*t && *t != '\"' && *t != '\'')