Fix: relayd: fully initialize viewer stream before publishing it
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 23 Nov 2019 00:04:16 +0000 (19:04 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 23 Nov 2019 00:30:25 +0000 (19:30 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/viewer-stream.c

index 8e3a1949288dfddf250b0f5cd6edfb3690318218..acd488b61846202813e8a7efe07898c1f67cfef7 100644 (file)
@@ -160,9 +160,8 @@ struct relay_viewer_stream *viewer_stream_create(struct relay_stream *stream,
 
        /* Globally visible after the add unique. */
        lttng_ht_node_init_u64(&vstream->stream_n, stream->stream_handle);
-       lttng_ht_add_unique_u64(viewer_streams_ht, &vstream->stream_n);
-
        urcu_ref_init(&vstream->ref);
+       lttng_ht_add_unique_u64(viewer_streams_ht, &vstream->stream_n);
 
        return vstream;
 
This page took 0.025588 seconds and 4 git commands to generate.