]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1706. [bug] 'rndc stop' failed to cause zones to be flushed
authorMark Andrews <marka@isc.org>
Fri, 27 Aug 2004 12:21:15 +0000 (12:21 +0000)
committerMark Andrews <marka@isc.org>
Fri, 27 Aug 2004 12:21:15 +0000 (12:21 +0000)
                        sometimes. [RT #12328]

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 696d947a68bdab729559b8c460d92f4f594a9a97..94d76c78d6b202a9d68263ceb99ba068f4eaf944 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,9 @@
 
 1707.  [contrib]       sdb/ldap updated to version 1.0-beta.
 
+1706.  [bug]           'rndc stop' failed to cause zones to be flushed
+                       sometimes. [RT #12328]
+
 1701.  [doc]           A minimal named.conf man page.
 
 1700.  [func]          nslookup is no longer to be treated as deprecated.
index 68a555958a2ffd60a03a0e56710816168697967d..cc948ba603e805e571fc8ff7ba39cb2986d66400 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.333.2.23.2.47 2004/07/29 00:17:10 marka Exp $ */
+/* $Id: zone.c,v 1.333.2.23.2.48 2004/08/27 12:21:15 marka Exp $ */
 
 #include <config.h>
 
@@ -4256,14 +4256,18 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) {
        if (zone->readio != NULL)
                zonemgr_cancelio(zone->readio);
 
-       if (zone->writeio != NULL)
-               zonemgr_cancelio(zone->writeio);
-
        if (zone->lctx != NULL)
                dns_loadctx_cancel(zone->lctx);
 
-       if (zone->dctx != NULL)
-               dns_dumpctx_cancel(zone->dctx);
+
+       if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FLUSH) ||
+           !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DUMPING)) {
+               if (zone->writeio != NULL)
+                       zonemgr_cancelio(zone->writeio);
+
+               if (zone->dctx != NULL) 
+                       dns_dumpctx_cancel(zone->dctx);
+       }
 
        notify_cancel(zone);