From f450814ab8989820a7bc9a2c484eb9f2c1c7b915 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 11 Jan 2005 23:56:50 +0000 Subject: [PATCH] 1793. [func] Extend adjusting TTL warning messages. [RT #13378] --- CHANGES | 2 +- lib/dns/diff.c | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index a6cd511340..83a5d74694 100644 --- a/CHANGES +++ b/CHANGES @@ -8,7 +8,7 @@ 1794. [func] Named and named-checkzone can now both check for non-terminal wildcard records. -1793. [placeholder] rt13378 +1793. [func] Extend adjusting TTL warning messages. [RT #13378] 1792. [func] New zone option "notify-delay". Specify a minimum delay between sets of NOTIFY messages. diff --git a/lib/dns/diff.c b/lib/dns/diff.c index 651b9564fc..c24f20ec0f 100644 --- a/lib/dns/diff.c +++ b/lib/dns/diff.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: diff.c,v 1.9 2004/03/05 05:09:19 marka Exp $ */ +/* $Id: diff.c,v 1.10 2005/01/11 23:56:50 marka Exp $ */ #include @@ -30,8 +30,10 @@ #include #include #include +#include #include #include +#include #include #define CHECK(op) \ @@ -195,6 +197,9 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, dns_difftuple_t *t; dns_dbnode_t *node = NULL; isc_result_t result; + char namebuf[DNS_NAME_FORMATSIZE]; + char typebuf[DNS_RDATATYPE_FORMATSIZE]; + char classbuf[DNS_RDATACLASS_FORMATSIZE]; REQUIRE(DNS_DIFF_VALID(diff)); REQUIRE(DNS_DB_VALID(db)); @@ -254,11 +259,19 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, t->rdata.type == type && rdata_covers(&t->rdata) == covers) { + dns_name_format(name, namebuf, sizeof(namebuf)); + dns_rdatatype_format(t->rdata.type, typebuf, + sizeof(typebuf)); + dns_rdataclass_format(t->rdata.rdclass, + classbuf, + sizeof(classbuf)); if (t->ttl != rdl.ttl && warn) isc_log_write(DIFF_COMMON_LOGARGS, ISC_LOG_WARNING, - "TTL differs in rdataset, " - "adjusting %lu -> %lu", + "'%s/%s/%s': TTL differs in " + "rdataset, adjusting " + "%lu -> %lu", + namebuf, typebuf, classbuf, (unsigned long) t->ttl, (unsigned long) rdl.ttl); ISC_LIST_APPEND(rdl.rdata, &t->rdata, link);