Fix: set channel key to message on notify channel
[lttng-tools.git] / src / common / consumer.c
index 990db9e2690eff92ec683b8dd1df1aef65542ab0..b5fe9831640217455c40c11b9e85e36b470ec05c 100644 (file)
@@ -102,6 +102,7 @@ static void notify_channel_pipe(struct lttng_consumer_local_data *ctx,
 
        msg.action = action;
        msg.chan = chan;
+       msg.key = key;
        do {
                ret = write(ctx->consumer_channel_pipe[1], &msg, sizeof(msg));
        } while (ret < 0 && errno == EINTR);
@@ -906,7 +907,7 @@ int consumer_add_channel(struct lttng_consumer_channel *channel,
                /* Channel already exist. Ignore the insertion */
                ERR("Consumer add channel key %" PRIu64 " already exists!",
                        channel->key);
-               ret = -1;
+               ret = LTTNG_ERR_KERN_CHAN_EXIST;
                goto end;
        }
 
This page took 0.024127 seconds and 5 git commands to generate.