summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorMarius Vollmer <marius.vollmer@redhat.com>2013-04-18 22:34:36 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-18 22:34:36 +0200
commita3e6f050de81a9830e52af09d5d38dad9a356e3b (patch)
treebf2961b20daa69af83b26ebabfadcb0aa502fd9e /src/journal/sd-journal.c
parentcc400110ffe1fb29b32e995e770819c1817bbfbc (diff)
journal: when iterating through a file we might lose messages when changing direction.
https://bugs.freedesktop.org/show_bug.cgi?id=63672
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 88af68c1f1..e021d98155 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -109,6 +109,9 @@ static void set_location(sd_journal *j, LocationType type, JournalFile *f, Objec
init_location(&j->current_location, type, f, o);
+ if (j->current_file)
+ j->current_file->current_offset = 0;
+
j->current_file = f;
j->current_field = 0;