From 8865eeaf14b4f435fc79f61ce4aaa0a3dbfcd02e Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Tue, 10 Apr 2001 19:19:49 +0000 Subject: [PATCH] Don't log a generic "sending notifies" message if there are no servers to be notified. --- lib/dns/zone.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index e749584929..8718908830 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.317 2001/04/10 03:05:54 marka Exp $ */ +/* $Id: zone.c,v 1.318 2001/04/10 19:19:49 bwelling Exp $ */ #include @@ -2518,6 +2518,7 @@ zone_notify(dns_zone_t *zone) { isc_boolean_t isqueued; dns_notifytype_t notifytype; unsigned int flags = 0; + isc_boolean_t loggednotify = ISC_FALSE; REQUIRE(DNS_ZONE_VALID(zone)); @@ -2605,8 +2606,6 @@ zone_notify(dns_zone_t *zone) { if (result != ISC_R_SUCCESS) goto cleanup3; - notify_log(zone, ISC_LOG_INFO, "sending notify (%u)", serial); - dns_rdataset_init(&nsrdset); result = dns_db_findrdataset(zone->db, node, version, dns_rdatatype_ns, @@ -2628,6 +2627,13 @@ zone_notify(dns_zone_t *zone) { result = dns_rdataset_next(&nsrdset); continue; } + + if (!loggednotify) { + notify_log(zone, ISC_LOG_INFO, "sending notifies (%u)", + serial); + loggednotify = ISC_TRUE; + } + LOCK_ZONE(zone); isqueued = notify_isqueued(zone, &ns.name, NULL); UNLOCK_ZONE(zone);