/* Add ltt UST context node to ltt UST channel */
lttng_ht_add_unique_ulong(uchan->ctx, &uctx->node);
rcu_read_unlock();
+ cds_list_add_tail(&uctx->list, &uchan->ctx_list);
DBG("Context UST %d added to channel %s", uctx->ctx.ctx, uchan->name);
LTTNG_SYMBOL_NAME_LEN);
kctx.u.perf_counter.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
- if (strlen(channel_name) == 0) {
+ if (*channel_name == '\0') {
ret = add_kctx_all_channels(ksession, &kctx);
if (ret != LTTNG_OK) {
goto error;
assert(ctx);
assert(channel_name);
+ rcu_read_lock();
+
/*
* Define which channel's hashtable to use from the domain or quit if
* unknown domain.
}
/* Get UST channel if defined */
- if (strlen(channel_name) != 0) {
+ if (channel_name[0] != '\0') {
uchan = trace_ust_find_channel_by_name(chan_ht, channel_name);
if (uchan == NULL) {
ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
}
error:
+ rcu_read_unlock();
return ret;
}