struct lttng_event_context *ctx, char *event_name,
char *channel_name)
{
- int ret = LTTCOMM_OK, have_event = 0;
+ int ret = LTTCOMM_OK, have_event = 0, no_chan = 1;
struct lttng_ht_iter iter;
struct lttng_ht *chan_ht;
struct ltt_ust_channel *uchan = NULL;
} else if (!uchan && !have_event) { /* Add ctx all events, all channels */
/* For all channels */
cds_lfht_for_each_entry(chan_ht->ht, &iter.iter, uchan, node.node) {
+ no_chan = 0;
ret = add_uctx_to_channel(usess, domain, uchan, ctx);
if (ret < 0) {
- ERR("Context added to channel %s failed", uchan->name);
+ ERR("Context failed for channel %s", uchan->name);
continue;
}
}
ret = LTTCOMM_FATAL;
break;
case -EINVAL:
- ret = LTTCOMM_UST_CONTEXT_FAIL;
+ ret = LTTCOMM_UST_CONTEXT_INVAL;
break;
case -ENOSYS:
ret = LTTCOMM_UNKNOWN_DOMAIN;
break;
}
+ if (no_chan) {
+ ret = LTTCOMM_UST_CHAN_NOT_FOUND;
+ }
+
error:
return ret;
}