Cleanup and add comments to ust_app.c
[lttng-tools.git] / lttng-sessiond / main.c
index d52dcb945bfe3cfbbfbd69a29b8f78700ac794f8..aae9b3dfe6f5f1f7ea2516873ee5f778aca2be27 100644 (file)
@@ -1879,6 +1879,7 @@ static int list_lttng_ust_global_events(char *channel_name,
                cds_lfht_for_each_entry(uchan->events, &iter, uevent, node) {
                        strncpy(tmp[i].name, uevent->attr.name, LTTNG_SYMBOL_NAME_LEN);
                        tmp[i].name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
+                       tmp[i].enabled = uevent->enabled;
                        switch (uevent->attr.instrumentation) {
                        case LTTNG_UST_TRACEPOINT:
                                tmp[i].type = LTTNG_EVENT_TRACEPOINT;
@@ -2096,11 +2097,13 @@ static int cmd_enable_channel(struct ltt_session *session,
                }
 
                /* Add channel to all registered applications */
-               ret = ust_app_add_channel_all(usess, uchan);
+               ret = ust_app_create_channel_all(usess, uchan);
                if (ret != 0) {
                        goto error;
                }
 
+               uchan->enabled = 1;
+
                break;
        }
        case LTTNG_DOMAIN_UST_PID:
@@ -2357,7 +2360,7 @@ static int cmd_enable_event(struct ltt_session *session, int domain,
 
                }
 
-               ret = ust_app_add_event_all(usess, uchan, uevent);
+               ret = ust_app_create_event_all(usess, uchan, uevent);
                if (ret < 0) {
                        ret = LTTCOMM_UST_ENABLE_FAIL;
                        goto error;
@@ -2368,6 +2371,8 @@ static int cmd_enable_event(struct ltt_session *session, int domain,
                hashtable_add_unique(uchan->events, &uevent->node);
                rcu_read_unlock();
 
+               uevent->enabled = 1;
+
                DBG3("UST ltt event %s added to channel %s", uevent->attr.name,
                                uchan->name);
                break;
This page took 0.025936 seconds and 5 git commands to generate.