Commit c234ac00 authored by David Lawrence's avatar David Lawrence

The _real_ fix for the callback_name generation problem in findnode.

It wasn't that chain->end was being included (it should have been) but
that the chain had already been expanded to point down a level before
the call to chain_name that needed the state of things before the
descent.
parent b975721c
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: rbt.c,v 1.41 1999/04/16 21:01:58 tale Exp $ */
/* $Id: rbt.c,v 1.42 1999/04/17 15:19:45 tale Exp $ */
/* Principal Authors: DCL */
......@@ -795,9 +795,6 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
search_name = tmp_name;
ADD_ANCESTOR(chain, NULL);
ADD_LEVEL(chain, current);
/*
* This might be the closest enclosing name.
*/
......@@ -812,14 +809,15 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
* caller wants to do.
*/
if (callback != NULL && CALLBACK(current)) {
chain->end = current;
result = chain_name(chain,
callback_name,
ISC_FALSE);
ISC_TRUE);
if (result != DNS_R_SUCCESS) {
dns_rbtnodechain_reset(chain);
return (result);
}
chain->end = NULL;
result = (callback)(current,
callback_name,
......@@ -838,6 +836,9 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
/*
* Search in the next tree level.
*/
ADD_ANCESTOR(chain, NULL);
ADD_LEVEL(chain, current);
current = DOWN(current);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment