mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Use journal_write_xhdr() to write the dummy transaction header
Instead of journal_write(), use correct format call journal_write_xhdr() to write the dummy transaction header which looks at j->header_ver1 to determine which transaction header to write instead of always writing a zero filled journal_rawxhdr_t header.
This commit is contained in:
committed by
Ondřej Surý
parent
81c5f5e6a8
commit
5a6112ec8f
@@ -1101,7 +1101,6 @@ isc_result_t
|
|||||||
dns_journal_begin_transaction(dns_journal_t *j) {
|
dns_journal_begin_transaction(dns_journal_t *j) {
|
||||||
uint32_t offset;
|
uint32_t offset;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
journal_rawxhdr_t hdr;
|
|
||||||
|
|
||||||
REQUIRE(DNS_JOURNAL_VALID(j));
|
REQUIRE(DNS_JOURNAL_VALID(j));
|
||||||
REQUIRE(j->state == JOURNAL_STATE_WRITE ||
|
REQUIRE(j->state == JOURNAL_STATE_WRITE ||
|
||||||
@@ -1128,8 +1127,7 @@ dns_journal_begin_transaction(dns_journal_t *j) {
|
|||||||
* space. It will be filled in when the transaction is
|
* space. It will be filled in when the transaction is
|
||||||
* finished.
|
* finished.
|
||||||
*/
|
*/
|
||||||
memset(&hdr, 0, sizeof(hdr));
|
CHECK(journal_write_xhdr(j, 0, 0, 0, 0));
|
||||||
CHECK(journal_write(j, &hdr, sizeof(hdr)));
|
|
||||||
j->x.pos[1].offset = j->offset;
|
j->x.pos[1].offset = j->offset;
|
||||||
|
|
||||||
j->state = JOURNAL_STATE_TRANSACTION;
|
j->state = JOURNAL_STATE_TRANSACTION;
|
||||||
|
Reference in New Issue
Block a user