From patchwork Thu Dec 5 06:58:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 3552096 From: mathieu.desnoyers at efficios.com (Mathieu Desnoyers) Date: Thu, 5 Dec 2019 01:58:08 -0500 Subject: [lttng-dev] [PATCH babeltrace-1.5 5/6] Fix: lttng-live: ctf_live_packet_seek stream hang up handling In-Reply-To: <20191205065809.16728-1-mathieu.desnoyers@efficios.com> References: <20191205065809.16728-1-mathieu.desnoyers@efficios.com> Message-ID: <20191205065809.16728-6-mathieu.desnoyers@efficios.com> When get_next_index sets the index position to EOF, ctf_live_packet_seek() should in turn set the stream position to EOF to propagate the hung up state. Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live-comm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index 96817f5e..484c025d 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -1276,7 +1276,11 @@ retry: cur_index->packet_size, cur_index->offset, cur_index->content_size, cur_index->ts_cycles.timestamp_end); - + if (cur_index->offset == EOF) { + pos->offset = EOF; + ret = -BT_PACKET_SEEK_ERROR; + goto end; + } } /*