From: Marius Vollmer Date: Thu, 18 Apr 2013 20:34:36 +0000 (+0200) Subject: journal: when iterating through a file we might lose messages when changing direction. X-Git-Tag: v202~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a3e6f050de81a9830e52af09d5d38dad9a356e3b;p=elogind.git journal: when iterating through a file we might lose messages when changing direction. https://bugs.freedesktop.org/show_bug.cgi?id=63672 --- diff --git a/TODO b/TODO index 1221b39cd..cd66914b5 100644 --- a/TODO +++ b/TODO @@ -32,6 +32,8 @@ Fedora 19: Features: +* truncate whitespace of var names the same way as values in parse_env_file_internal() + * dbus: when a unit failed to load (i.e. is in UNIT_ERROR state), we should be able to safely try another attempt when the bus call LoadUnit() is invoked. diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 88af68c1f..e021d9815 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;