From 562cc4924b7a2605fca0864740d2b9cdab57ef95 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 10 Aug 2000 19:50:02 +0000 Subject: [PATCH] when sending notifies is suppressed due to the zone being unloaded, clear the NEEDNOTIFY flag so that we don't reschedule the notify every second --- lib/dns/zone.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 340f71002a..28edc49c68 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.181 2000/08/10 19:34:49 bwelling Exp $ */ +/* $Id: zone.c,v 1.182 2000/08/10 19:50:02 gson Exp $ */ #include @@ -1523,10 +1523,9 @@ dns_zone_maintenance(dns_zone_t *zone) { switch (zone->type) { case dns_zone_master: case dns_zone_slave: - if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) && - DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY)) { + if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY)) dns_zone_notify(zone); - } + break; default: break; } @@ -2092,6 +2091,9 @@ dns_zone_notify(dns_zone_t *zone) { notifytype = zone->notifytype; UNLOCK(&zone->lock); + if (! DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED)) + return; + if (notifytype == dns_notifytype_no) return;