Fix ovnisort handling of last event

This commit is contained in:
Rodrigo Arias 2022-10-07 09:38:20 +02:00
parent bb1ff36a58
commit 362c47553b

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2021 Barcelona Supercomputing Center (BSC) /* Copyright (c) 2021-2022 Barcelona Supercomputing Center (BSC)
* SPDX-License-Identifier: GPL-3.0-or-later */ * SPDX-License-Identifier: GPL-3.0-or-later */
/* This program is a really bad idea. It attempts to sort streams by using a /* This program is a really bad idea. It attempts to sort streams by using a
@ -241,8 +241,7 @@ stream_winsort(struct ovni_stream *stream, struct ring *r)
size_t updated = 0; size_t updated = 0;
char st = 'S'; char st = 'S';
while (stream->active) { while (ovni_load_next_event(stream) == 0) {
ovni_load_next_event(stream);
struct ovni_ev *ev = stream->cur_ev; struct ovni_ev *ev = stream->cur_ev;
if (st == 'S' && starts_unsorted_region(ev)) { if (st == 'S' && starts_unsorted_region(ev)) {