From bed7a352934efc8055902d83c750dca2d0cd6aaa Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Wed, 28 Mar 2001 00:58:15 +0000 Subject: [PATCH] dns_master_questiontotext() needs a style argument after all --- lib/dns/include/dns/masterdump.h | 5 +++-- lib/dns/masterdump.c | 14 ++++++++++++-- lib/dns/message.c | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/dns/include/dns/masterdump.h b/lib/dns/include/dns/masterdump.h index a3d7f05d54..6d0f6ac73b 100644 --- a/lib/dns/include/dns/masterdump.h +++ b/lib/dns/include/dns/masterdump.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: masterdump.h,v 1.20 2001/03/28 00:50:01 gson Exp $ */ +/* $Id: masterdump.h,v 1.21 2001/03/28 00:58:15 gson Exp $ */ #ifndef DNS_MASTERDUMP_H #define DNS_MASTERDUMP_H 1 @@ -127,7 +127,7 @@ dns_master_dump(isc_mem_t *mctx, dns_db_t *db, isc_result_t dns_master_rdatasettotext(dns_name_t *owner_name, dns_rdataset_t *rdataset, - const dns_master_style_t *style, + const dns_master_style_t *style, isc_buffer_t *target); /* * Convert 'rdataset' to text format, storing the result in 'target'. @@ -144,6 +144,7 @@ dns_master_rdatasettotext(dns_name_t *owner_name, isc_result_t dns_master_questiontotext(dns_name_t *owner_name, dns_rdataset_t *rdataset, + const dns_master_style_t *style, isc_buffer_t *target); /* * Print a text representation of 'rdataset', a pseudo-rdataset diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index 405032cea4..547be1bb49 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: masterdump.c,v 1.48 2001/03/28 00:54:40 gson Exp $ */ +/* $Id: masterdump.c,v 1.49 2001/03/28 00:58:12 gson Exp $ */ #include @@ -581,9 +581,19 @@ dns_master_rdatasettotext(dns_name_t *owner_name, isc_result_t dns_master_questiontotext(dns_name_t *owner_name, dns_rdataset_t *rdataset, + const dns_master_style_t *style, isc_buffer_t *target) { - return (question_totext(rdataset, owner_name, NULL, + dns_totext_ctx_t ctx; + isc_result_t result; + result = totext_ctx_init(style, &ctx); + if (result != ISC_R_SUCCESS) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "could not set master file style"); + return (ISC_R_UNEXPECTED); + } + + return (question_totext(rdataset, owner_name, &ctx, ISC_FALSE, target)); } diff --git a/lib/dns/message.c b/lib/dns/message.c index 2fd78ffcb9..5e18b820a5 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: message.c,v 1.187 2001/03/28 00:50:05 gson Exp $ */ +/* $Id: message.c,v 1.188 2001/03/28 00:58:13 gson Exp $ */ /*** *** Imports @@ -2842,6 +2842,7 @@ dns_message_sectiontotext(dns_message_t *msg, dns_section_t section, ADD_STRING(target, ";"); result = dns_master_questiontotext(name, rdataset, + &dns_master_style_debug, target); } else { result = dns_master_rdatasettotext(name,