From 846c8960a34733cb58b980000758402735f6a3dd Mon Sep 17 00:00:00 2001 From: hno <> Date: Thu, 12 May 2005 01:22:20 +0000 Subject: [PATCH] idnsQueryID bugfix.. return the newly found non-clashing ID. Thanks to Tony Finch for alerting us on this errro --- src/dns_internal.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dns_internal.cc b/src/dns_internal.cc index e7494da5f6..24d584d887 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.76 2005/05/10 11:46:41 hno Exp $ + * $Id: dns_internal.cc,v 1.77 2005/05/11 19:22:20 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -557,11 +557,13 @@ idnsQueryID(void) while(idnsFindQuery(id)) { id++; - if (id == first_id) + if (id == first_id) { + debug(78, 1) ("idnsQueryID: Warning, too many pending DNS requests\n"); break; + } } - return squid_random() & 0xFFFF; + return id; } static void -- 2.47.2