]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal/journal-file.c
journal: when iterating through entry arrays and we hit an invalid one keep going
authorLennart Poettering <lennart@poettering.net>
Wed, 12 Oct 2016 10:36:01 +0000 (12:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Oct 2016 18:25:20 +0000 (20:25 +0200)
commit989793d341e730f452175fa18cf0f7ef4529d62c
tree7c7a4b44b6d8f88cc20cd9c273cb834d7bae280d
parent1c69f0966a86e3c9ae0120e6222709414b68e186
journal: when iterating through entry arrays and we hit an invalid one keep going

When iterating through partially synced journal files we need to be prepared
for hitting with invalid entries (specifically: non-initialized). Instead of
generated an error and giving up, let's simply try to preceed with the next one
that is valid (and debug log about this).

This reworks the logic introduced with caeab8f626e709569cc492b75eb7e119076059e7
to iteration in both directions, and tries to look for valid entries located
after the invalid one. It also extends the behaviour to both iterating through
the global entry array and per-data object entry arrays.

Fixes: #4088
src/journal/journal-file.c