X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fsd-journal.c;fp=src%2Fjournal%2Fsd-journal.c;h=0fefe2bc6e38ee03b879ad3cf4aeefa7c69bacc0;hb=7943f42275025e1b6642b580b19b24dfab8dee61;hp=0aaf2257d4c668640a151f0b5de15b8ff7cbd8a4;hpb=6e693b42dcb0b332364b0414107826826925c49f;p=elogind.git diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 0aaf2257d..0fefe2bc6 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -742,6 +742,12 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc f->last_n_entries = n_entries; if (f->last_direction == direction && f->current_offset > 0) { + /* LOCATION_SEEK here means we did the work in a previous + * iteration and the current location already points to a + * candidate entry. */ + if (f->location_type == LOCATION_SEEK) + return 1; + cp = f->current_offset; r = journal_file_move_to_object(f, OBJECT_ENTRY, cp, &c);