X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=1017fd47f7201924ca1f7abde2b15f728dbe39f7;hb=c3c841f480fd72c3e9ae7212fb9b48bb2e15e821;hp=10a4bb41c6e7485bd173bd53e3daa736682dab98;hpb=814fcae48b741e800bc2dccbad8c96f8ce4a3082;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 10a4bb41c..1017fd47f 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1030,18 +1030,10 @@ void set_viewer_ready_flag(struct relay_command *cmd) * Stream is most probably being cleaned up by the data thread thus * simply continue to the next one. */ + rcu_read_unlock(); continue; } - /* - * If any of the streams in the list doesn't have a ctf_trace assigned, - * it means that we never received the metadata stream, so we have to - * wait until it arrives to make the streams available to the viewer. - */ - if (!stream->ctf_trace) { - goto end; - } - stream->viewer_ready = 1; rcu_read_unlock(); @@ -1050,7 +1042,6 @@ void set_viewer_ready_flag(struct relay_command *cmd) free(node); } -end: return; } @@ -1172,7 +1163,11 @@ int relay_add_stream(struct lttcomm_relayd_hdr *recv_hdr, * stream message is received, this list is emptied and streams are set * with the viewer ready flag. */ - queue_stream_handle(stream->stream_handle, cmd); + if (stream->metadata_flag) { + stream->viewer_ready = 1; + } else { + queue_stream_handle(stream->stream_handle, cmd); + } lttng_ht_node_init_ulong(&stream->stream_n, (unsigned long) stream->stream_handle);