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, 7 Aug 2015 21:30:29 +0000 (17:30 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/ust-consumer/ust-consumer.c

index fbc3bbb43d5e3d9164606676dc38875d05473823..df12f6b8746de71a4a1ef952359abe2158268733 100644 (file)
@@ -352,8 +352,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.035582 seconds and 4 git commands to generate.