From: wessels <> Date: Sat, 25 Apr 1998 00:47:42 +0000 (+0000) Subject: Removed hacks in peer_select.c for ASN lookups. We cannot delay X-Git-Tag: SQUID_3_0_PRE1~3420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7cd15f7503e48791eb1608d2cf5c29881e1d83e;p=thirdparty%2Fsquid.git Removed hacks in peer_select.c for ASN lookups. We cannot delay wait for IP lookups in the peer selection process, and we do not want to lookup EVERY address there. Instead, the acl.c routines will lookup IP addresses for hostnames if they are not available. So the first time we check some host, it may not match, but should be present for subsequent requests. --- diff --git a/src/peer_select.cc b/src/peer_select.cc index d262b30689..84f1dabbf2 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.54 1998/04/24 07:09:41 wessels Exp $ + * $Id: peer_select.cc,v 1.55 1998/04/24 18:47:42 wessels Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -66,11 +66,9 @@ static char *DirectStr[] = }; static void peerSelectFoo(ps_state *); -static void peerSelectCheckAS(ps_state *); static void peerPingTimeout(void *data); static void peerSelectCallbackFail(ps_state * psstate); static IRCB peerHandleIcpReply; -static IPH peerSelectCheckASDone; static void peerSelectStateFree(ps_state * psstate); static void peerIcpParentMiss(peer *, icp_common_t *, ps_state *); static int peerCheckNetdbDirect(ps_state * psstate); @@ -150,33 +148,9 @@ peerSelect(request_t * request, request->hier.peer_select_start = current_time; #endif cbdataLock(callback_data); - peerSelectCheckAS(psstate); -} - -static void -peerSelectCheckASDone(const ipcache_addrs * ia, void *data) -{ - ps_state *psstate = data; peerSelectFoo(psstate); } -static void -peerSelectCheckAS(ps_state * psstate) -{ - request_t *request = psstate->request; - -/* XXXX Just a quick hack to get the destination address to the - * ipcache, because peerSelectIcpPing requires non-blocking ACL - * check. - * We should handle AS acl's differently than cache_host ones. */ - - ipcache_nbgethostbyname(request->host, - peerSelectCheckASDone, - psstate); - return; -} - - static void peerCheckNeverDirectDone(int answer, void *data) {