From 903e9d41ef730f098d38da9588f2824f37b7d73c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 23 Feb 2001 22:32:07 +0000 Subject: [PATCH] 751. [func] Log successful zone loads / transfers. --- CHANGES | 2 ++ lib/dns/zone.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 373899648d..9a7c0e1cf1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ + 751. [func] Log successful zone loads / transfers. + 750. [bug] A query should not match a DNAME whose trust level is pending. [RT #916] diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 96583792d7..8850e7da8d 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.307 2001/02/14 03:50:11 gson Exp $ */ +/* $Id: zone.c,v 1.308 2001/02/23 22:32:07 marka Exp $ */ #include @@ -1119,7 +1119,8 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, } else dns_zone_log(zone, ISC_LOG_ERROR, "loading master file %s: %s", - zone->masterfile, dns_result_totext(result)); + zone->masterfile, + dns_result_totext(result)); goto cleanup; } @@ -1264,6 +1265,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, zone_needdump(zone, DNS_DUMP_DELAY); if (zone->task != NULL) zone_settimer(zone, now); + dns_zone_log(zone, ISC_LOG_INFO, "loaded serial %u", zone->serial); return (result); cleanup: @@ -4629,6 +4631,7 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) { unsigned int soacount; unsigned int nscount; isc_uint32_t serial, refresh, retry, expire, minimum; + isc_result_t xfrresult = result; REQUIRE(DNS_ZONE_VALID(zone)); @@ -4723,6 +4726,9 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) { zone->expiretime = now + zone->expire; } + if (result == ISC_R_SUCCESS && xfrresult == ISC_R_SUCCESS) + dns_zone_log(zone, ISC_LOG_INFO, + "transfered serial %u", zone->serial); break;