--------------------- PatchSet 11239 Date: 2007/02/05 15:17:12 Author: hno Branch: HEAD Tag: (none) Log: MFC: Clean up relations between TCP probing and DNS checks of peers with no known addresses. Members: src/cache_cf.c:1.463->1.464 src/neighbors.c:1.314->1.315 Index: squid/src/cache_cf.c =================================================================== RCS file: /cvsroot/squid/squid/src/cache_cf.c,v retrieving revision 1.463 retrieving revision 1.464 diff -u -r1.463 -r1.464 --- squid/src/cache_cf.c 18 Jan 2007 23:19:14 -0000 1.463 +++ squid/src/cache_cf.c 5 Feb 2007 15:17:12 -0000 1.464 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.c,v 1.463 2007/01/18 23:19:14 hno Exp $ + * $Id: cache_cf.c,v 1.464 2007/02/05 15:17:12 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1765,7 +1765,6 @@ if (p->weight < 1) p->weight = 1; p->icp.version = ICP_VERSION_CURRENT; - p->tcp_up = PEER_TCP_MAGIC_COUNT; p->test_fd = -1; #if USE_CACHE_DIGESTS if (!p->options.no_digest) { Index: squid/src/neighbors.c =================================================================== RCS file: /cvsroot/squid/squid/src/neighbors.c,v retrieving revision 1.314 retrieving revision 1.315 diff -u -r1.314 -r1.315 --- squid/src/neighbors.c 21 Jan 2007 12:54:00 -0000 1.314 +++ squid/src/neighbors.c 5 Feb 2007 15:17:12 -0000 1.315 @@ -1,6 +1,6 @@ /* - * $Id: neighbors.c,v 1.314 2007/01/21 12:54:00 adrian Exp $ + * $Id: neighbors.c,v 1.315 2007/02/05 15:17:12 hno Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -1014,6 +1014,7 @@ debug(0, 0) ("WARNING: No IP address found for '%s'!\n", p->host); 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])); @@ -1081,6 +1082,8 @@ neighborTypeStr(p), p->name); peerMonitorNow(p); p->stats.logged_state = PEER_ALIVE; + if (!p->n_addresses) + ipcache_nbgethostbyname(p->host, peerDNSConfigure, p); } p->tcp_up = PEER_TCP_MAGIC_COUNT; }