- if (strlen(event_name) == 0) {
- no_event = 1;
- }
-
- DBG("Adding ust context to all channels (event: %s)", event_name);
-
- struct cds_lfht_node *node;
- struct cds_lfht_iter iter;
-
- rcu_read_lock();
- hashtable_get_first(channels, &iter);
- while ((node = hashtable_iter_get_node(&iter)) != NULL) {
- ustchan = caa_container_of(node, struct ltt_ust_channel, node);
- if (no_event) {
- //ret = ustctl_add_context(ustsession->sock,
- // ustctx, ustchan->obj, &context_data);
- if (ret < 0) {
- ret = LTTCOMM_UST_CONTEXT_FAIL;
- rcu_read_unlock();
- goto error;
- }
- } else {
- ret = add_ustctx_to_event(ustsession, ustctx, ustchan, event_name);
- if (ret < 0) {
- ret = LTTCOMM_UST_CONTEXT_FAIL;
- rcu_read_unlock();
- goto error;
- } else if (ret == 1) {
- /* Event found and context added */
- found = 1;
- break;
- }
- }
- hashtable_get_next(channels, &iter);
- }
- rcu_read_unlock();
-
- if (!found && !no_event) {
- ret = LTTCOMM_NO_EVENT;
+ switch (domain) {
+ case LTTNG_DOMAIN_UST:
+ chan_ht = usess->domain_global.channels;
+ break;
+ case LTTNG_DOMAIN_UST_EXEC_NAME:
+ case LTTNG_DOMAIN_UST_PID:
+ case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+ default:
+ ret = LTTCOMM_NOT_IMPLEMENTED;