Commit 9658892d authored by David Lawrence's avatar David Lawrence
Browse files

revert the changes to dns_name_format() back to dns_name_totext() because

dns_name_format() does not print absolute names
parent e4bd5f69
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbt_test.c,v 1.36 2000/07/28 02:59:05 tale Exp $ */
/* $Id: rbt_test.c,v 1.37 2000/07/31 22:33:59 tale Exp $ */
#include <config.h>
......@@ -95,10 +95,17 @@ delete_name(void *data, void *arg) {
static void
print_name(dns_name_t *name) {
isc_buffer_t target;
char buffer[1024];
dns_name_format(name, buffer, sizeof(buffer));
printf("%s", buffer);
isc_buffer_init(&target, buffer, sizeof(buffer));
/*
* ISC_FALSE means absolute names have the final dot added.
*/
dns_name_totext(name, ISC_FALSE, &target);
printf("%.*s", (int)target.used, (char *)target.base);
}
static void
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbt.c,v 1.87 2000/07/27 09:46:21 tale Exp $ */
/* $Id: rbt.c,v 1.88 2000/07/31 22:34:01 tale Exp $ */
/* Principal Authors: DCL */
......@@ -1841,19 +1841,26 @@ dns_rbt_indent(int depth) {
static void
dns_rbt_printnodename(dns_rbtnode_t *node) {
isc_buffer_t target;
isc_region_t r;
dns_name_t name;
char buffer[1024];
dns_offsets_t offsets;
r.length = NAMELEN(node);
r.base = NAME(node);
dns_name_init(&name, NULL);
dns_name_init(&name, offsets);
dns_name_fromregion(&name, &r);
dns_name_format(&name, buffer, sizeof(buffer));
isc_buffer_init(&target, buffer, 255);
/*
* ISC_FALSE means absolute names have the final dot added.
*/
dns_name_totext(&name, ISC_FALSE, &target);
printf("%s", buffer);
printf("%.*s", (int)target.used, (char *)target.base);
}
static void
......
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