summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-03 11:58:16 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-03 11:58:16 +0200
commite590af2666d2a958d355f9957e77ec967bb16011 (patch)
tree6faa3ae636f24c3db3b51790287cef83a77b9ec4 /src/journal/sd-journal.c
parentd1970645411ea1cc083ea1668e0d446252dc1505 (diff)
journal: fix iteration through journal if one file is corrupt
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 9c6cbaac51..75884594a1 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -670,9 +670,10 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
bool found;
r = next_beyond_location(j, f, direction, &o, &p);
- if (r < 0)
- return r;
- else if (r == 0)
+ if (r < 0) {
+ log_debug("Can't iterate through %s, ignoring: %s", f->path, strerror(-r));
+ continue;
+ } else if (r == 0)
continue;
if (!new_current)