]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Drop terminal comments and garbage options from cache_peer lines
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 May 2013 18:36:45 +0000 (12:36 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 May 2013 18:36:45 +0000 (12:36 -0600)
src/cache_cf.cc

index f26e43db5119be854590f96e147ef1aeb1848eae..265abd09c004085022c96da508da0469f32d45f6 100644 (file)
@@ -2335,9 +2335,11 @@ parse_peer(CachePeer ** head)
             p->connection_auth = 1;
         } else if (strcmp(token, "connection-auth=auto") == 0) {
             p->connection_auth = 2;
+        } else if (token[0] == '#') {
+            // start of a text comment. stop reading this line.
+            break;
         } else {
-            debugs(3, DBG_CRITICAL, "parse_peer: token='" << token << "'");
-            self_destruct();
+            debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Ignoring unknown cache_peer option '" << token << "'");
         }
     }