Change consumer_data_pipe to be a lttng_pipe
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index 031a7cb261a52fa8d6b0c4c53be291be5896b973..8bc69006b0e1f30744ea41524e95d7ed1af3de0b 100644 (file)
@@ -191,7 +191,7 @@ static int send_stream_to_thread(struct lttng_consumer_stream *stream,
        if (stream->metadata_flag) {
                stream_pipe = ctx->consumer_metadata_pipe[1];
        } else {
-               stream_pipe = ctx->consumer_data_pipe[1];
+               stream_pipe = lttng_pipe_get_writefd(ctx->consumer_data_pipe);
        }
 
        do {
@@ -278,6 +278,12 @@ static int create_ust_streams(struct lttng_consumer_channel *channel,
                 */
                stream->wait_fd = wait_fd;
 
+               /*
+                * Increment channel refcount since the channel reference has now been
+                * assigned in the allocation process above.
+                */
+               uatomic_inc(&stream->chan->refcount);
+
                /*
                 * Order is important this is why a list is used. On error, the caller
                 * should clean this list.
This page took 0.023315 seconds and 4 git commands to generate.