X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=96bc337262d65cf525484ac14962f2b44eee19a6;hp=6990dd9678ad2723738e3cf5dd18fe2dd53b069f;hb=821fffb2f13c9d5178df306f3c87edbeaf881a22;hpb=63c861bd62870a344c1246855228562f3442171a diff --git a/src/common/consumer.c b/src/common/consumer.c index 6990dd967..96bc33726 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -890,6 +890,8 @@ end: /* * Add a channel to the global list protected by a mutex. + * + * On success 0 is returned else a negative value. */ int consumer_add_channel(struct lttng_consumer_channel *channel, struct lttng_consumer_local_data *ctx) @@ -907,7 +909,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 = LTTNG_ERR_KERN_CHAN_EXIST; + ret = -EEXIST; goto end; }