From: Amos Jeffries Date: Thu, 20 May 2010 11:59:14 +0000 (+1200) Subject: Actually do DNS after peers selected X-Git-Tag: take08~55^2~124^2~147 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3dfe8371f644d84f71dfac996af26f8bfadeb2d9;p=thirdparty%2Fsquid.git Actually do DNS after peers selected --- diff --git a/src/peer_select.cc b/src/peer_select.cc index 7c74e2b166..f017773222 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -221,16 +221,17 @@ peerSelectDnsPaths(ps_state *psstate) if (fs) { // send the next one off for DNS lookup. const char *host = fs->_peer ? fs->_peer->host : psstate->request->GetHost(); + debugs(44, 2, "Find IP destination for: " << psstate->entry->url() << "' via " << host); ipcache_nbgethostbyname(host, peerSelectDnsResults, psstate); return; } // done with DNS lookups. pass back to caller - PSC *callback; - - callback = psstate->callback; + PSC *callback = psstate->callback; psstate->callback = NULL; + debugs(44, 2, "Found IP destination for: " << psstate->entry->url() << "'"); + void *cbdata; if (cbdataReferenceValidDone(psstate->callback_data, &cbdata)) { callback(psstate->paths, cbdata); @@ -421,7 +422,9 @@ peerSelectFoo(ps_state * ps) break; } - peerSelectCallback(ps); + // resolve the possible peers + peerSelectDnsPaths(ps); +// DEAD? peerSelectCallback(ps); } int peerAllowedToUse(const peer * p, HttpRequest * request);