X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=8bc69006b0e1f30744ea41524e95d7ed1af3de0b;hb=acdb9057878ddbd9c112206f3c1c4c2104093088;hp=031a7cb261a52fa8d6b0c4c53be291be5896b973;hpb=ea88ca2a0b3fa898e245893c43ae2185da0acc44;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 031a7cb26..8bc69006b 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -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.