]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Compile-time bug introduced in recent changes related to
authorwessels <>
Fri, 9 Dec 2005 08:02:24 +0000 (08:02 +0000)
committerwessels <>
Fri, 9 Dec 2005 08:02:24 +0000 (08:02 +0000)
ACLCheckList::fastCheck().  The declaration for checklist was moved
to an inner block, but it was still used outside.

src/snmp_core.cc

index c744ffd068e2f551c5fd9ef87b22f859aaaf8174..c1ea229153c2f54946f5eaa8ec24b9cdd8f81c73 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_core.cc,v 1.71 2005/12/08 20:08:47 wessels Exp $
+ * $Id: snmp_core.cc,v 1.72 2005/12/09 01:02:24 wessels Exp $
  *
  * DEBUG: section 49    SNMP support
  * AUTHOR: Glenn Chisholm
@@ -536,12 +536,12 @@ snmpDecodePacket(snmp_request_t * rq)
     PDU = snmp_pdu_create(0);
     rq->session.Version = SNMP_VERSION_1;
     Community = snmp_parse(&rq->session, PDU, buf, len);
-    checklist.src_addr = rq->from.sin_addr;
-    checklist.snmp_community = (char *) Community;
 
     if (Community) {
         ACLChecklist checklist;
         checklist.accessList = cbdataReference(Config.accessList.snmp);
+        checklist.src_addr = rq->from.sin_addr;
+        checklist.snmp_community = (char *) Community;
         /* cbdataReferenceDone() happens in either fastCheck() or ~ACLCheckList */
         allow = checklist.fastCheck();
     }