From 01c703d3e6152ec4167b96ae7fb863133f582510 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 7 Jun 2007 07:58:02 +0000 Subject: [PATCH] fixup double linked list insertion code. git-svn-id: file:///svn/unbound/trunk@372 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 5 +++++ iterator/iterator.c | 2 ++ services/outbound_list.c | 2 ++ services/outside_network.c | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 191367c7a..2e8221b5c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ +7 June 2007: Wouter + - fixup error in double linked list insertion for subqueries and + for outbound list of serviced queries for iterator module. + - nicer printout of outgoing port selection. + 5 June 2007: Wouter - iterator state finished. - subrequests without parent store in cache and stop. diff --git a/iterator/iterator.c b/iterator/iterator.c index da9f8e99b..ab70664c9 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -486,6 +486,8 @@ generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, subq->env = qstate->env; subq->work_info = qstate->work_info; subq->parent = qstate; + if(qstate->subquery_first) + qstate->subquery_first->subquery_prev = subq; subq->subquery_next = qstate->subquery_first; subq->subquery_prev = NULL; qstate->subquery_first = subq; diff --git a/services/outbound_list.c b/services/outbound_list.c index 789877a6c..5fce67f7b 100644 --- a/services/outbound_list.c +++ b/services/outbound_list.c @@ -66,6 +66,8 @@ outbound_list_clear(struct outbound_list* list) void outbound_list_insert(struct outbound_list* list, struct outbound_entry* e) { + if(list->first) + list->first->prev = e; e->next = list->first; e->prev = NULL; list->first = e; diff --git a/services/outside_network.c b/services/outside_network.c index 15fbde93d..0c65f41e1 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -701,7 +701,7 @@ select_port(struct outside_network* outnet, struct pending* pend, else pend->c = outnet->udp4_ports[chosen]; log_assert(pend->c); - verbose(VERB_ALGO, "query %x outbound %d of %d", pend->id, chosen, nummax); + verbose(VERB_ALGO, "query %x outbound on port %d of %d", pend->id, chosen, nummax); } -- 2.47.2