Fix: lttng-live: ctf_live_packet_seek stream hang up handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 5 Dec 2019 06:58:08 +0000 (01:58 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 13 Dec 2019 01:02:17 +0000 (20:02 -0500)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/lttng-live/lttng-live-comm.c

index 96817f5e170d65e02d310d0e9abc0bc224283c9f..484c025d2d5f0be04a803fa08ac5389e34dc3db0 100644 (file)
@@ -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;
+               }
        }
 
        /*
This page took 0.024918 seconds and 4 git commands to generate.