]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
date: 2003/01/02 22:59:37; author: wessels; state: Exp; lines: +0 -8
authorhno <>
Sat, 4 Jan 2003 08:13:56 +0000 (08:13 +0000)
committerhno <>
Sat, 4 Jan 2003 08:13:56 +0000 (08:13 +0000)
removing unused functions icmpPing() and netdbHostPeerRtt()

src/icmp.cc
src/net_db.cc
src/protos.h

index 592c522c48e8330149e9d4c83656e3236d334ccf..da74cc9d5d4320bfe0b895b670570fe51c958557 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.cc,v 1.80 2002/10/22 21:12:51 hno Exp $
+ * $Id: icmp.cc,v 1.81 2003/01/04 01:13:56 hno Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -147,14 +147,6 @@ icmpHandleSourcePing(const struct sockaddr_in *from, const char *buf)
 
 #endif /* USE_ICMP */
 
-void
-icmpPing(struct in_addr to)
-{
-#if USE_ICMP
-    icmpSendEcho(to, S_ICMP_ECHO, NULL, 0);
-#endif
-}
-
 #if ALLOW_SOURCE_PING
 void
 icmpSourcePing(struct in_addr to, const icp_common_t * header, const char *url)
index cf8914c7abf5da4de536022bf7c01e87ff1e603c..2ad67ae85078a018cd47098d3277cd5385b926e1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.166 2002/10/25 07:36:32 robertc Exp $
+ * $Id: net_db.cc,v 1.167 2003/01/04 01:13:56 hno Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -917,23 +917,10 @@ netdbHostData(const char *host, int *samp, int *rtt, int *hops)
     *samp = n->pings_recv;
     *rtt = (int) (n->rtt + 0.5);
     *hops = (int) (n->hops + 0.5);
+    n->last_use_time = squid_curtime;
 #endif
 }
 
-int
-netdbHostPeerRtt(const char *host, peer * p)
-{
-#if USE_ICMP
-    const netdbEntry *n = netdbLookupHost(host);
-    if (n) {
-       const net_db_peer *np = netdbPeerByName(n, p->host);
-       if (np && np->expires >= squid_curtime)
-           return (int) (np->rtt + 0.5);
-    }
-#endif
-    return 0;
-}
-
 void
 netdbUpdatePeer(request_t * r, peer * e, int irtt, int ihops)
 {
@@ -1128,6 +1115,7 @@ netdbClosestParent(request_t * request)
        return NULL;
     if (0 == n->n_peers)
        return NULL;
+    n->last_use_time = squid_curtime;
     /* 
      * Find the parent with the least RTT to the origin server.
      * Make sure we don't return a parent who is farther away than
index b0e6f11921507fcf55d1ada94e518b99195869be..c44c0719b3bf21c7edc871d0a16753cb13e26ae0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.458 2002/12/27 10:26:33 robertc Exp $
+ * $Id: protos.h,v 1.459 2003/01/04 01:13:56 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -534,7 +534,6 @@ SQUIDCEXTERN int httpRequestHdrAllowedByName(http_hdr_type id);
 
 SQUIDCEXTERN void icmpOpen(void);
 SQUIDCEXTERN void icmpClose(void);
-SQUIDCEXTERN void icmpPing(struct in_addr to);
 SQUIDCEXTERN void icmpSourcePing(struct in_addr to, const icp_common_t *, const char *url);
 SQUIDCEXTERN void icmpDomainPing(struct in_addr to, const char *domain);
 
@@ -686,7 +685,6 @@ SQUIDCEXTERN int netdbHops(struct in_addr);
 SQUIDCEXTERN void netdbFreeMemory(void);
 SQUIDCEXTERN int netdbHostHops(const char *host);
 SQUIDCEXTERN int netdbHostRtt(const char *host);
-SQUIDCEXTERN int netdbHostPeerRtt(const char *host, peer * p);
 SQUIDCEXTERN void netdbUpdatePeer(request_t *, peer * e, int rtt, int hops);
 SQUIDCEXTERN void netdbDeleteAddrNetwork(struct in_addr addr);
 SQUIDCEXTERN void netdbBinaryExchange(StoreEntry *);