]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Close off some FIXME INET6 that are not really needed.
authoramosjeffries <>
Wed, 19 Dec 2007 06:24:25 +0000 (06:24 +0000)
committeramosjeffries <>
Wed, 19 Dec 2007 06:24:25 +0000 (06:24 +0000)
Removes a bypass that should have been removed before HEAD push. Oops.

src/cache_cf.cc
src/snmp_core.cc

index 0323d93d761de6c562d215f49751bad429dd00c1..ea504cfa157654735aa5d5789c9c87f8bbd533ad 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.529 2007/12/14 23:11:46 amosjeffries Exp $
+ * $Id: cache_cf.cc,v 1.530 2007/12/18 23:24:25 amosjeffries Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1774,7 +1774,6 @@ parse_peer(peer ** head)
 
     p->index =  ++Config.npeers;
 
-// FIXME INET6 : maybe sort peers so the SNMP indexing works better?
     while (*head != NULL)
         head = &(*head)->next;
 
index 401a8edd84eede1d275f7beeac718f5397b248fd..57bc0627da277f0b58c1f92741c96dba1a1d2fe6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_core.cc,v 1.80 2007/12/14 23:11:48 amosjeffries Exp $
+ * $Id: snmp_core.cc,v 1.81 2007/12/18 23:24:25 amosjeffries Exp $
  *
  * DEBUG: section 49    SNMP support
  * AUTHOR: Glenn Chisholm
@@ -539,11 +539,6 @@ snmpDecodePacket(snmp_request_t * rq)
         allow = checklist.fastCheck();
     }
 
-#if 1 /* FIXME INET6 : Kill this block before committing to HEAD. */
-    /* RAFA, Amos, DO NOT COMMIT INTO AHEAD with this !!! */
-    allow = 1 ;
-    /* allow */
-#endif /* KILL */
     if ((snmp_coexist_V2toV1(PDU)) && (Community) && (allow)) {
         rq->community = Community;
         rq->PDU = PDU;
@@ -878,46 +873,51 @@ client_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn
     oid *instance = NULL;
     IPAddress laddr;
     IPAddress *aux;
+    int size = 0;
+    int newshift = 0;
 
-    if (*len <= current->len) {
-      aux  = client_entry(NULL);  
-      // FIXME INET6 . is this good C++ style ?
-      // What otherwise ?
-      if (aux) laddr = *aux ; else laddr.SetAnyAddr();
+    if(*len <= current->len) {
+        aux  = client_entry(NULL);  
+        if(aux)
+            laddr = *aux;
+        else
+            laddr.SetAnyAddr();
 
+        if(laddr.IsIPv4())
+            size = sizeof(in_addr);
 #if USE_IPV6
-      int size = laddr.IsIPv4()? sizeof(in_addr) : sizeof(in6_addr)  ;
-#else 
-      int size = sizeof(in_addr);
+        else
+            size = sizeof(in6_addr);
 #endif
 
-      instance = (oid *)xmalloc(sizeof(name) * (*len + size ));
-      xmemcpy(instance, name, (sizeof(name) * (*len)));
+        instance = (oid *)xmalloc(sizeof(name) * (*len + size ));
+        xmemcpy(instance, name, (sizeof(name) * (*len)));
 
-      if ( !laddr.IsAnyAddr() ) {
-       addr2oid(laddr, &instance[ *len]);  // the addr
-       *len += size ;
-      }
+        if ( !laddr.IsAnyAddr() ) {
+            addr2oid(laddr, &instance[ *len]);  // the addr
+            *len += size ;
+        }
     } else {
-      int shift = *len - current->len ; // i.e 4 or 16 
-      oid2addr(&name[*len - shift], laddr,shift); 
-      aux = client_entry(&laddr);  
-      // FIXME INET6 . is this good C++ style ?
-      // What otherwise ?
-      if (aux) laddr = *aux ; else laddr.SetAnyAddr();
-
+        int shift = *len - current->len ; // i.e 4 or 16 
+        oid2addr(&name[*len - shift], laddr,shift); 
+        aux = client_entry(&laddr);  
+        if(aux)
+            laddr = *aux;
+        else
+            laddr.SetAnyAddr();
       
-      if (!laddr.IsAnyAddr()) {
+        if(!laddr.IsAnyAddr()) {
+            if(laddr.IsIPv4())
+                newshift = sizeof(in_addr);
 #if USE_IPV6
-         int newshift = laddr.IsIPv4()? sizeof(in_addr) : sizeof(in6_addr)  ;
-#else
-         int newshift = sizeof(in_addr) ;
+            else
+                newshift = sizeof(in6_addr);
 #endif
-       instance = (oid *)xmalloc(sizeof(name) * (current->len +  newshift));
-       xmemcpy(instance, name, (sizeof(name) * (current->len)));
-       addr2oid(laddr, &instance[current->len]);  // the addr.
-       *len = current->len + newshift ;
-      }
+            instance = (oid *)xmalloc(sizeof(name) * (current->len +  newshift));
+            xmemcpy(instance, name, (sizeof(name) * (current->len)));
+            addr2oid(laddr, &instance[current->len]);  // the addr.
+            *len = current->len + newshift ;
+        }
     }
     
     *Fn = current->parsefunction;