]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed hacks in peer_select.c for ASN lookups. We cannot delay
authorwessels <>
Sat, 25 Apr 1998 00:47:42 +0000 (00:47 +0000)
committerwessels <>
Sat, 25 Apr 1998 00:47:42 +0000 (00:47 +0000)
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.

src/peer_select.cc

index d262b30689be18174f049961f4bac820bfd2e3ce..84f1dabbf206a6088a597723278065c09474b362 100644 (file)
@@ -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)
 {