From: Jérémie Galarneau Date: Fri, 22 Nov 2013 01:19:25 +0000 (-0500) Subject: Fix: Take the iterator's end position into account X-Git-Tag: v1.2.0-rc1~44 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=5644e6f6cf1478fb7a983e37da5afe006a8b32af Fix: Take the iterator's end position into account Signed-off-by: Jérémie Galarneau --- diff --git a/formats/ctf/iterator.c b/formats/ctf/iterator.c index d2cd914e..d1152fca 100644 --- a/formats/ctf/iterator.c +++ b/formats/ctf/iterator.c @@ -126,6 +126,11 @@ struct bt_ctf_event *bt_ctf_iter_read_event_flags(struct bt_ctf_iter *iter, goto stop; } stream = &file_stream->parent; + if (iter->parent.end_pos && + iter->parent.end_pos->type == BT_SEEK_TIME && + stream->real_timestamp > iter->parent.end_pos->u.seek_time) { + goto stop; + } ret->parent = g_ptr_array_index(stream->events_by_id, stream->event_id);