From eca5913a47ff18279ddb41f3fa85f9b6ee6df6c6 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 16 Mar 1999 16:15:44 +0000 Subject: [PATCH] Made calls to dns_rbt_find{name,node} compatible with the just-committed changes to rbt.c by passing a NULL pointer for the dns_name_t that receives the full name of the node that is found. There is probably something better to do, but this just keeps things compiling. --- lib/dns/compress.c | 16 +++++++++++----- lib/dns/rbtdb.c | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/dns/compress.c b/lib/dns/compress.c index 8a84e32721..f5f9baf401 100644 --- a/lib/dns/compress.c +++ b/lib/dns/compress.c @@ -15,7 +15,7 @@ * SOFTWARE. */ - /* $Id: compress.c,v 1.7 1999/03/11 00:26:20 marka Exp $ */ + /* $Id: compress.c,v 1.8 1999/03/16 16:15:44 tale Exp $ */ #include @@ -447,10 +447,13 @@ compress_find(dns_rbt_t *root, dns_name_t *name, dns_name_t *prefix, while (count > 1) { dns_name_getlabelsequence(name, start, count, &tmpname); data = NULL; - result = dns_rbt_findname(root, &tmpname, (void *)&data); + result = dns_rbt_findname(root, &tmpname, NULL, (void *)&data); /* XXX @@@ is this right, Mark? note that for data to be non-null, then result can - be DNS_R_SUCCESS or DNS_R_PARTIALMATCH */ + be DNS_R_SUCCESS or DNS_R_PARTIALMATCH + XXX @@@ third argument to findname is a name with a fixed + buffer (eg, a dns_fixedname_name()). + */ if (result == DNS_R_SUCCESS && data != NULL) break; count--; @@ -482,8 +485,11 @@ compress_find(dns_rbt_t *root, dns_name_t *name, dns_name_t *prefix, if (result != DNS_R_SUCCESS) continue; data = NULL; - result = dns_rbt_findname(root, &tmpname, (void *)&data); - /* XXX @@@ is this right, Mark? */ + result = dns_rbt_findname(root, &tmpname, NULL, + (void *)&data); + /* XXX @@@ is this right, Mark? + XXX @@@ modify third arg for foundname? + */ if (result == DNS_R_SUCCESS && data != NULL) break; if (bits == 1) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 23effa9ba4..e20d97f15a 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -719,7 +719,7 @@ findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create, dns_name_init(&foundname, NULL); RWLOCK(&rbtdb->tree_lock, locktype); - result = dns_rbt_findnode(rbtdb->tree, name, &node, NULL); + result = dns_rbt_findnode(rbtdb->tree, name, NULL, &node, NULL); again: if (result == DNS_R_SUCCESS) { locknum = node->locknum;