From 48841a4ae942e11f95fee15086ba2f5820be06d1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 29 May 2000 05:47:18 +0000 Subject: [PATCH] When checking for notifies in the queue first check to see if a request has been sent. Check DNS_ZONE_F_NEEDREFRESH when we have got to the last master in refresh_callback. --- lib/dns/zone.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index c8a9c8bfa9..37670ff50c 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: zone.c,v 1.130 2000/05/26 18:18:12 gson Exp $ */ +/* $Id: zone.c,v 1.131 2000/05/29 05:47:18 marka Exp $ */ #include @@ -1546,6 +1546,8 @@ notify_isqueued(dns_zone_t *zone, dns_name_t *name, isc_sockaddr_t *addr) { for (notify = ISC_LIST_HEAD(zone->notifies); notify != NULL; notify = ISC_LIST_NEXT(notify, link)) { + if (notify->request != NULL) + continue; if (name != NULL && dns_name_dynamic(¬ify->ns) && dns_name_equal(name, ¬ify->ns)) return (ISC_TRUE); @@ -2137,7 +2139,10 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { zone->curmaster++; if (zone->curmaster >= zone->masterscnt) { zone->flags &= ~DNS_ZONE_F_REFRESH; - + if (DNS_ZONE_FLAG(zone, DNS_ZONE_F_NEEDREFRESH)) { + zone->flags &= ~DNS_ZONE_F_NEEDREFRESH; + zone->refreshtime = now; + } zone_settimer(zone, now); UNLOCK(&zone->lock); return;