1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Fix inverted page checksum load/save.

This was not caught before because the on-disk format was correct even though the representation in memory was inverted.
This commit is contained in:
David Steele 2019-11-20 14:24:58 -05:00
parent 63c4c14836
commit 3d2c0b0f3b

View File

@ -498,7 +498,7 @@ manifestLoadCallback(void *callbackData, const String *section, const String *ke
if (checksumPage != NULL)
{
file.checksumPage = true;
file.checksumPageError = varBool(checksumPage);
file.checksumPageError = !varBool(checksumPage);
const Variant *checksumPageErrorList = kvGetDefault(fileKv, MANIFEST_KEY_CHECKSUM_PAGE_ERROR_VAR, NULL);
@ -1138,7 +1138,7 @@ manifestSaveCallback(void *callbackData, const String *sectionNext, InfoSave *in
if (file->checksumPage)
{
kvPut(fileKv, MANIFEST_KEY_CHECKSUM_PAGE_VAR, VARBOOL(file->checksumPageError));
kvPut(fileKv, MANIFEST_KEY_CHECKSUM_PAGE_VAR, VARBOOL(!file->checksumPageError));
if (file->checksumPageErrorList != NULL)
kvPut(fileKv, MANIFEST_KEY_CHECKSUM_PAGE_ERROR_VAR, varNewVarLst(file->checksumPageErrorList));