From 93a0e33450f61ee40919ccc65bc3d4e872f2258b Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 9 Apr 1999 15:27:58 +0000 Subject: [PATCH] Include the origin node in it its own cut. IE, when coming through ab.rc.vix.com, bb.rc.vix.com, ... back to rc.vix.com, don't declare a new origin until _after_ rc.vix.com has been returned. --- lib/dns/rbt.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index 8b7425bde9..0de6fb6627 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: rbt.c,v 1.33 1999/04/09 15:21:14 tale Exp $ */ +/* $Id: rbt.c,v 1.34 1999/04/09 15:27:58 tale Exp $ */ /* Principal Authors: DCL */ @@ -1776,6 +1776,13 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name, current = chain->end; + if (DOWN(current) != NULL && origin != NULL) { + /* XXX came up through this down pointer? */ + /* XXX DCL probably needs work on the concept */ + result = chain_name(chain, origin, ISC_FALSE); + new_origin = ISC_TRUE; + } + if (LEFT(current) != NULL) { ADD_ANCESTOR(chain, current); current = LEFT(current); @@ -1843,16 +1850,6 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name, predecessor = chain->levels[--chain->level_count]; chain->ancestor_count--; - /* XXX DCL probably needs work on the concept */ - /* XXX DCL in any event, this is wrong. the names under - * an origin are supposed to include the origin itself. - * somehow i have to defer the new_origin until after - * this node is returned. - */ - if (origin && chain->level_count > 0) { - result = chain_name(chain, origin, ISC_FALSE); - new_origin = ISC_TRUE; - } } if (result == DNS_R_SUCCESS) {