Fix: set stream id in HUP case
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Aug 2015 18:41:04 +0000 (14:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Jan 2018 19:46:03 +0000 (14:46 -0500)
In the case where a stream is closed when we get its first index, we
still need a valid stream_id to assign it in the right stream (channel).
In this case, it is not useful afterwards, but the debug output has the
right value instead of -1ULL.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/lttng-live/lttng-live-comm.c

index 0c6228b463bdff63b974da617328105ee1945725..065af49fb06f5f1be0d02f8a39e9919ddafef50b 100644 (file)
@@ -1104,6 +1104,7 @@ retry:
                bt_list_del(&viewer_stream->trace_stream_node);
                bt_list_del(&viewer_stream->session_stream_node);
                g_free(viewer_stream);
+               *stream_id = be64toh(rp->stream_id);
                break;
        case LTTNG_VIEWER_INDEX_ERR:
                fprintf(stderr, "[error] get_next_index: error\n");
This page took 0.032898 seconds and 4 git commands to generate.