Fix: metadata stream should be always flagged as ready
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 10 Jan 2014 16:45:53 +0000 (11:45 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 14 Jan 2014 15:51:15 +0000 (10:51 -0500)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-relayd/main.c

index 7e5733ec8c3253432bd61dbac17b0968fefef21a..c32ea815d694f70593a44c5fea59d48067fc313a 100644 (file)
@@ -1166,18 +1166,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();
 
@@ -1186,7 +1178,6 @@ void set_viewer_ready_flag(struct relay_command *cmd)
                free(node);
        }
 
-end:
        return;
 }
 
@@ -1308,7 +1299,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);
This page took 0.030504 seconds and 5 git commands to generate.