From ec7493d8d1966a3dc5f5306fc0a96519e0de6dce Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Sun, 14 May 2000 02:31:09 +0000 Subject: [PATCH] 172. [bug] $TTL directive was sometimes missing from dumped master files because totext_ctx_init() failed to initialize ctx->current_ttl_valid. --- CHANGES | 4 ++++ lib/dns/masterdump.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 8b9af7181e..7d9c9235e2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ + 172. [bug] $TTL directive was sometimes missing from dumped + master files because totext_ctx_init() failed to + initialize ctx->current_ttl_valid. + 171. [cleanup] On NetBSD systems, the mit-pthreads or unproven-pthreads library is now always used unless --with-ptl2 is explicitly specified on the configure command line. diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index ab5675f530..7555e30a16 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -226,8 +226,11 @@ static isc_result_t totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) { isc_result_t result; - ctx->style = *style; REQUIRE(style->tab_width != 0); + + ctx->style = *style; + ctx->class_printed = ISC_FALSE; + dns_fixedname_init(&ctx->origin_fixname); /* @@ -271,8 +274,9 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) { ctx->linebreak = NULL; } - ctx->class_printed = ISC_FALSE; ctx->origin = NULL; + ctx->current_ttl = 0; + ctx->current_ttl_valid = ISC_FALSE; return (ISC_R_SUCCESS); }