Fix: intialization of ust_metadata_poll_pipe to garbage value
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Aug 2015 21:01:37 +0000 (17:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 14 Aug 2015 22:10:21 +0000 (18:10 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/ust-consumer/ust-consumer.c

index f891828f700afca41c7cb0ea6606c7943efcac1f..7eba01d10da7ebb7f3faaa397847af922229bef8 100644 (file)
@@ -327,8 +327,12 @@ static int create_ust_streams(struct lttng_consumer_channel *channel,
                /* Keep stream reference when creating metadata. */
                if (channel->type == CONSUMER_CHANNEL_TYPE_METADATA) {
                        channel->metadata_stream = stream;
-                       stream->ust_metadata_poll_pipe[0] = ust_metadata_pipe[0];
-                       stream->ust_metadata_poll_pipe[1] = ust_metadata_pipe[1];
+                       if (channel->monitor) {
+                               /* Set metadata poll pipe if we created one */
+                               memcpy(stream->ust_metadata_poll_pipe,
+                                               ust_metadata_pipe,
+                                               sizeof(ust_metadata_pipe));
+                       }
                }
        }
 
This page took 0.027185 seconds and 4 git commands to generate.