From 6cefa82d9ac3e68fa75fab293c63d7bd72a8bd82 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 7 Dec 1999 06:26:59 +0000 Subject: [PATCH] dns_journal_rollforward() now returns DNS_R_JOURNAL if the file does not exist. --- lib/dns/include/dns/journal.h | 7 ++++++- lib/dns/journal.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/dns/include/dns/journal.h b/lib/dns/include/dns/journal.h index 04cf597b72..1736584db1 100644 --- a/lib/dns/include/dns/journal.h +++ b/lib/dns/include/dns/journal.h @@ -472,7 +472,12 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename); * 'db' is a valid database which does not have a version * open for writing. * 'filename' is the name of the journal file belonging to 'db'. - * + * + * Returns: + * DNS_R_NOJOURNAL when journal does not exist. + * DNS_R_NOTFOUND when current serial in not in journal. + * DNS_R_SUCCESS journal has been applied successfully to database. + * others */ dns_result_t dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file); diff --git a/lib/dns/journal.c b/lib/dns/journal.c index 116723a3ff..1b27a1080f 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -1155,7 +1155,7 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write, if (! write && JOURNAL_EMPTY(&j->header)) { isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR, "journal file %s is empty", j->filename); - FAIL(DNS_R_NOTFOUND); + FAIL(DNS_R_NOJOURNAL); } /* @@ -1820,7 +1820,7 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename) { if (result == DNS_R_NOTFOUND) { isc_log_write(JOURNAL_DEBUG_LOGARGS(3), "no journal file, but that's OK"); - return (DNS_R_SUCCESS); + return (DNS_R_NOJOURNAL); } if (result != DNS_R_SUCCESS) return (result);