From: wessels <> Date: Mon, 19 Apr 1999 13:16:29 +0000 (+0000) Subject: Fixed queue traversal. we only check the last queue entry because X-Git-Tag: SQUID_3_0_PRE1~2257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c4fe9e4aeb7eb18fce2ff00c4707e8ea1df7a60;p=thirdparty%2Fsquid.git Fixed queue traversal. we only check the last queue entry because n->prev was always NULL after removing it from the double linked list. --- diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 9dff6a8b4d..af0b81998b 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.11 1999/04/19 07:06:14 wessels Exp $ + * $Id: dns_internal.cc,v 1.12 1999/04/19 07:16:29 wessels Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -318,14 +318,16 @@ static void idnsCheckQueue(void *unused) { dlink_node *n; + dlink_node *p = NULL; idns_query *q; event_queued = 0; - for (n = lru_list.tail; n; n = n->prev) { + for (n = lru_list.tail; n; n = p) { q = n->data; if (tvSubDsec(q->sent_t, current_time) < 5.0) break; debug(78, 3) ("idnsCheckQueue: ID %#04x timeout\n", q->id); + p = n->prev; dlinkDelete(&q->lru, &lru_list); if (q->nsends < IDNS_MAX_TRIES) { idnsSendQuery(q);