diff --git a/CHANGES b/CHANGES index 2fd2b75c0f..595d358543 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ + 952. [bug] The server required manual intervention to serve the + affected zones if it died between creating a journal + and committing the first change to it. 951. [bug] CFLAGS was not passed to the linker when linking some of the test programs under diff --git a/lib/dns/journal.c b/lib/dns/journal.c index eb79de2cef..54c4c4480c 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: journal.c,v 1.76 2001/06/04 19:33:02 tale Exp $ */ +/* $Id: journal.c,v 1.77 2001/08/06 02:10:59 marka Exp $ */ #include @@ -603,18 +603,6 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write, } journal_header_decode(&rawheader, &j->header); - /* - * When opening a journal for reading, it is not supposed to - * be empty - if there are no transactions, the file should - * not exist. - */ - if (! write && JOURNAL_EMPTY(&j->header)) { - isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR, - "%s: journal unexpectedly empty", - j->filename); - FAIL(ISC_R_UNEXPECTED); - } - /* * If there is an index, read the raw index into a dynamically * allocated buffer and then convert it into a cooked index. @@ -1334,7 +1322,10 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename) { } if (result != ISC_R_SUCCESS) return (result); - result = roll_forward(j, db); + if (JOURNAL_EMPTY(&j->header)) + result = DNS_R_UPTODATE; + else + result = roll_forward(j, db); dns_journal_destroy(&j);