]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
store copy offset fixes
authorwessels <>
Tue, 5 May 1998 22:11:30 +0000 (22:11 +0000)
committerwessels <>
Tue, 5 May 1998 22:11:30 +0000 (22:11 +0000)
src/neighbors.cc
src/net_db.cc

index 3493ba0b87214d5fc4e5430a631bb88be3871965..80f91544433666a37a9b967e89adef2e9e4e562b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.202 1998/05/05 05:35:39 wessels Exp $
+ * $Id: neighbors.cc,v 1.203 1998/05/05 16:11:30 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -932,9 +932,7 @@ peerDNSConfigure(const ipcache_addrs * ia, void *data)
     ap->sin_port = htons(p->icp_port);
     if (p->type == PEER_MULTICAST)
        peerCountMcastPeersSchedule(p, 10);
-#if USE_PEER_NETDB
     eventAddIsh("netdbExchangeStart", netdbExchangeStart, p, 30);
-#endif
 }
 
 static void
index 928beef481782cc38c83a3366731b54cfc2bc832..27b56bf13ac37704910bacd9ae1e6f4cb0903750 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.85 1998/05/05 05:35:40 wessels Exp $
+ * $Id: net_db.cc,v 1.86 1998/05/05 16:11:31 wessels Exp $
  *
  * DEBUG: section 37    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -927,7 +927,7 @@ netdbExchangeHandleReply(void *data, char *buf, ssize_t size)
     rec_sz += 1 + sizeof(addr.s_addr);
     rec_sz += 1 + sizeof(int);
     rec_sz += 1 + sizeof(int);
-    ex->seen += size;
+    ex->seen = ex->used + size;
     debug(0, 0) ("netdbExchangeHandleReply: %d bytes\n", (int) size);
     if (!cbdataValid(ex->p)) {
        netdbExchangeDone(ex);
@@ -944,7 +944,7 @@ netdbExchangeHandleReply(void *data, char *buf, ssize_t size)
                netdbExchangeDone(ex);
                return;
            }
-           assert(size > hdr_sz);
+           assert(size >= hdr_sz);
            ex->used += hdr_sz;
            size -= hdr_sz;
            p += hdr_sz;
@@ -952,7 +952,7 @@ netdbExchangeHandleReply(void *data, char *buf, ssize_t size)
            size = 0;
        }
     }
-    while (size > rec_sz) {
+    while (size >= rec_sz) {
        addr.s_addr = 0;
        hops = rtt = 0.0;
        for (o = 0; o < rec_sz;) {