From: hno <> Date: Mon, 5 Feb 2007 22:16:31 +0000 (+0000) Subject: Clean up relations between TCP probing and DNS checks of peers with no known addresses. X-Git-Tag: SQUID_3_0_PRE6~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc3a5177f4e7683d03bf39c8d33afe01afebda02;p=thirdparty%2Fsquid.git Clean up relations between TCP probing and DNS checks of peers with no known addresses. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 227c22d90a..f52d26d7e1 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.503 2006/12/24 13:43:08 serassio Exp $ + * $Id: cache_cf.cc,v 1.504 2007/02/05 15:16:31 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1651,8 +1651,6 @@ parse_peer(peer ** head) p->icp.version = ICP_VERSION_CURRENT; - p->tcp_up = PEER_TCP_MAGIC_COUNT; - p->test_fd = -1; #if USE_CACHE_DIGESTS diff --git a/src/neighbors.cc b/src/neighbors.cc index f3234d4da8..83baf7631d 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.343 2006/12/24 13:43:08 serassio Exp $ + * $Id: neighbors.cc,v 1.344 2007/02/05 15:16:31 hno Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -1328,6 +1328,8 @@ peerDNSConfigure(const ipcache_addrs * ia, void *data) return; } + p->tcp_up = PEER_TCP_MAGIC_COUNT; + for (j = 0; j < (int) ia->count && j < PEER_MAX_ADDRESSES; j++) { p->addresses[j] = ia->in_addrs[j]; debug(15, 2) ("--> IP address #%d: %s\n", j, inet_ntoa(p->addresses[j])); @@ -1404,6 +1406,8 @@ peerConnectSucceded(peer * p) debug(15, 1) ("Detected REVIVED %s: %s\n", neighborTypeStr(p), p->name); p->stats.logged_state = PEER_ALIVE; + if (!p->n_addresses) + ipcache_nbgethostbyname(p->host, peerDNSConfigure, p); } p->tcp_up = PEER_TCP_MAGIC_COUNT;