From: Amos Jeffries Date: Thu, 10 Mar 2011 12:32:42 +0000 (+1300) Subject: proto ACL overly verbose on "Ignoring unknown protocol" X-Git-Tag: take06~27^2~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d749b3133dea538c3322babc66da6a52474fbf6;p=thirdparty%2Fsquid.git proto ACL overly verbose on "Ignoring unknown protocol" Minor logic error in display. No actual operational effects. --- diff --git a/src/acl/ProtocolData.cc b/src/acl/ProtocolData.cc index 54281d69c6..7aba10769c 100644 --- a/src/acl/ProtocolData.cc +++ b/src/acl/ProtocolData.cc @@ -88,16 +88,19 @@ ACLProtocolData::parse() for (Tail = &values; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { - for (int p = AnyP::PROTO_NONE; p < AnyP::PROTO_UNKNOWN; ++p) { + int p = AnyP::PROTO_NONE; + for (; p < AnyP::PROTO_UNKNOWN; ++p) { if (strcasecmp(t, AnyP::ProtocolType_str[p]) == 0) { CbDataList *q = new CbDataList(static_cast(p)); *(Tail) = q; Tail = &q->next; break; - } else { - debugs(28, DBG_IMPORTANT, "WARNING: Ignoring unknown protocol '" << t << "' in the ACL named '" << AclMatchedName << "'"); } } + if (p == AnyP::PROTO_UNKNOWN) { + debugs(28, DBG_IMPORTANT, "WARNING: Ignoring unknown protocol '" << t << "' in the ACL named '" << AclMatchedName << "'"); + // XXX: store the text pattern of this protocol name for live comparisons + } } }