X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel-consumer.c;h=0f59aa24f51decc781c760ddef1007399851355d;hb=d222983eed2efddbd4a1380e23bc3f43edfc522e;hp=a65e1493c384ea75401266b019b56ab605ce7e89;hpb=e9404c27e7cc9d841785e6c4292c1add19fbc1cc;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/kernel-consumer.c b/src/bin/lttng-sessiond/kernel-consumer.c index a65e1493c..0f59aa24f 100644 --- a/src/bin/lttng-sessiond/kernel-consumer.c +++ b/src/bin/lttng-sessiond/kernel-consumer.c @@ -168,6 +168,9 @@ int kernel_consumer_add_channel(struct consumer_socket *sock, ret = -1; goto error; } + + channel->published_to_notification_thread = true; + error: free(pathname); return ret; @@ -338,7 +341,7 @@ int kernel_consumer_send_channel_stream(struct consumer_socket *sock, struct ltt_kernel_channel *channel, struct ltt_kernel_session *session, unsigned int monitor) { - int ret; + int ret = LTTNG_OK; struct ltt_kernel_stream *stream; /* Safety net */ @@ -356,9 +359,12 @@ int kernel_consumer_send_channel_stream(struct consumer_socket *sock, DBG("Sending streams of channel %s to kernel consumer", channel->channel->name); - ret = kernel_consumer_add_channel(sock, channel, session, monitor); - if (ret < 0) { - goto error; + if (!channel->sent_to_consumer) { + ret = kernel_consumer_add_channel(sock, channel, session, monitor); + if (ret < 0) { + goto error; + } + channel->sent_to_consumer = true; } /* Send streams */