From: hno <> Date: Sat, 4 Jan 2003 08:13:56 +0000 (+0000) Subject: date: 2003/01/02 22:59:37; author: wessels; state: Exp; lines: +0 -8 X-Git-Tag: SQUID_3_0_PRE1~479 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ed6ef621a8a964bc7babb9a447e3366d6bda509;p=thirdparty%2Fsquid.git date: 2003/01/02 22:59:37; author: wessels; state: Exp; lines: +0 -8 removing unused functions icmpPing() and netdbHostPeerRtt() --- diff --git a/src/icmp.cc b/src/icmp.cc index 592c522c48..da74cc9d5d 100644 --- a/src/icmp.cc +++ b/src/icmp.cc @@ -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) diff --git a/src/net_db.cc b/src/net_db.cc index cf8914c7ab..2ad67ae850 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -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 diff --git a/src/protos.h b/src/protos.h index b0e6f11921..c44c0719b3 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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 *);