From 37a636f387d4d1f4b9dad961ccce5871592f5829 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 7 Oct 2022 11:02:03 +0200 Subject: [PATCH] Fix ovnisort check too --- src/sort.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sort.c b/src/sort.c index c6a73d9..d4d24c7 100644 --- a/src/sort.c +++ b/src/sort.c @@ -295,13 +295,14 @@ stream_winsort(struct ovni_stream *stream, struct ring *r) static int stream_check(struct ovni_stream *stream) { - ovni_load_next_event(stream); + if (ovni_load_next_event(stream) != 0) + return 0; + struct ovni_ev *ev = stream->cur_ev; uint64_t last_clock = ev->header.clock; int ret = 0; - while (stream->active) { - ovni_load_next_event(stream); + while (ovni_load_next_event(stream) == 0) { ev = stream->cur_ev; uint64_t cur_clock = ovni_ev_get_clock(ev);