2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

dns_journal_rollforward() now returns DNS_R_JOURNAL if the file does not exist.

This commit is contained in:
Mark Andrews
1999-12-07 06:26:59 +00:00
parent 3864eb0e9a
commit 6cefa82d9a
2 changed files with 8 additions and 3 deletions

View File

@@ -473,6 +473,11 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename);
* 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);

View File

@@ -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);