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:
@@ -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
|
* 'db' is a valid database which does not have a version
|
||||||
* open for writing.
|
* open for writing.
|
||||||
* 'filename' is the name of the journal file belonging to 'db'.
|
* '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);
|
dns_result_t dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *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)) {
|
if (! write && JOURNAL_EMPTY(&j->header)) {
|
||||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||||
"journal file %s is empty", j->filename);
|
"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) {
|
if (result == DNS_R_NOTFOUND) {
|
||||||
isc_log_write(JOURNAL_DEBUG_LOGARGS(3),
|
isc_log_write(JOURNAL_DEBUG_LOGARGS(3),
|
||||||
"no journal file, but that's OK");
|
"no journal file, but that's OK");
|
||||||
return (DNS_R_SUCCESS);
|
return (DNS_R_NOJOURNAL);
|
||||||
}
|
}
|
||||||
if (result != DNS_R_SUCCESS)
|
if (result != DNS_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
|
Reference in New Issue
Block a user