X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fsd-journal.c;h=d46dc3c29c6a7cee21eb44e5af5a7918e18e812c;hb=668c965af4e803f460925dc616f328ed274d1f3a;hp=89cab3733128d351901690b2a9d8c45f71dabcbb;hpb=b29ddfcb389127cf00ab41447a721e479fe15713;p=elogind.git diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 89cab3733..d46dc3c29 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -723,13 +723,13 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc assert(j); assert(f); - /* If we hit EOF before, recheck if any new entries arrived. */ - n_entries = le64toh(f->header->n_entries); - if (f->location_type == LOCATION_TAIL && n_entries == f->last_n_entries) - return 0; - f->last_n_entries = n_entries; - if (f->last_direction == direction && f->current_offset > 0) { + /* If we hit EOF before, recheck if any new entries arrived. */ + n_entries = le64toh(f->header->n_entries); + if (f->location_type == LOCATION_TAIL && n_entries == f->last_n_entries) + return 0; + f->last_n_entries = n_entries; + /* LOCATION_SEEK here means we did the work in a previous * iteration and the current location already points to a * candidate entry. */