X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=96bc337262d65cf525484ac14962f2b44eee19a6;hb=821fffb2f13c9d5178df306f3c87edbeaf881a22;hp=6990dd9678ad2723738e3cf5dd18fe2dd53b069f;hpb=63c861bd62870a344c1246855228562f3442171a;p=lttng-tools.git 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; }