diff --git a/CHANGES b/CHANGES index 6222456ada..f3fdad6067 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,8 @@ 1694. [bug] Report if the builtin views of "_default" / "_bind" are defined in named.conf. [RT #12023] -1693. [placeholder] rt12024 +1693. [bug] max-journal-size was not effective for master zones + with ixfr-from-differences set. [RT# 12024] 1692. [bug] Don't set -I, -L and -R flags when libcrypto is in /usr/lib. [RT #11971] diff --git a/lib/dns/zone.c b/lib/dns/zone.c index bb855c7e37..fe1d263f34 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.416 2004/06/04 02:40:50 marka Exp $ */ +/* $Id: zone.c,v 1.417 2004/07/29 00:17:06 marka Exp $ */ #include @@ -5235,6 +5235,31 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) { goto fail; if (dump) zone_needdump(zone, DNS_DUMP_DELAY); + else if (zone->journalsize != -1) { + isc_uint32_t serial; + + result = dns_db_getsoaserial(db, ver, &serial); + if (result == ISC_R_SUCCESS) { + result = dns_journal_compact(zone->mctx, + zone->journal, + serial, + zone->journalsize); + switch (result) { + case ISC_R_SUCCESS: + case ISC_R_NOSPACE: + case ISC_R_NOTFOUND: + dns_zone_log(zone, ISC_LOG_DEBUG(3), + "dns_journal_compact: %s", + dns_result_totext(result)); + break; + default: + dns_zone_log(zone, ISC_LOG_ERROR, + "dns_journal_compact failed: %s", + dns_result_totext(result)); + break; + } + } + } } else { if (dump && zone->masterfile != NULL) { isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,