journal: when iterating through a file we might lose messages when changing direction.

https://bugs.freedesktop.org/show_bug.cgi?id=63672
This commit is contained in:
Marius Vollmer 2013-04-18 22:34:36 +02:00 committed by Lennart Poettering
parent cc400110ff
commit a3e6f050de
2 changed files with 5 additions and 0 deletions

2
TODO
View file

@ -32,6 +32,8 @@ Fedora 19:
Features: 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 * 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. should be able to safely try another attempt when the bus call LoadUnit() is invoked.

View file

@ -109,6 +109,9 @@ static void set_location(sd_journal *j, LocationType type, JournalFile *f, Objec
init_location(&j->current_location, type, f, o); init_location(&j->current_location, type, f, o);
if (j->current_file)
j->current_file->current_offset = 0;
j->current_file = f; j->current_file = f;
j->current_field = 0; j->current_field = 0;