Merge branch 'master' of git://git.lttng.org/lttng-tools
[lttng-tools.git] / lttng-sessiond / main.c
index 5755363c878d6e9c6663763b123c8839a9dc82ac..fa196e7b033bfe07f97ac994803afc384c6f274c 100644 (file)
@@ -1098,7 +1098,7 @@ static void *thread_manage_apps(void *data)
                                                goto error;
                                        }
 
-                                       /* Socket closed */
+                                       /* Socket closed on remote end. */
                                        ust_app_unregister(pollfd);
                                        break;
                                }
@@ -2047,7 +2047,7 @@ static int cmd_enable_channel(struct ltt_session *session,
        int ret;
        struct ltt_ust_session *usess = session->ust_session;
 
-       DBG("Enabling channel %s for session %s", session->name, attr->name);
+       DBG("Enabling channel %s for session %s", attr->name, session->name);
 
        switch (domain->type) {
        case LTTNG_DOMAIN_KERNEL:
@@ -2096,7 +2096,7 @@ static int cmd_enable_channel(struct ltt_session *session,
 
                /* Add channel to all registered applications */
                ret = ust_app_add_channel_all(usess, uchan);
-               if (ret != LTTCOMM_OK) {
+               if (ret != 0) {
                        goto error;
                }
 
@@ -2493,10 +2493,11 @@ static int cmd_start_trace(struct ltt_session *session)
 {
        int ret;
        struct ltt_kernel_session *ksession;
-       struct ltt_ust_session *usess = session->ust_session;
+       struct ltt_ust_session *usess;
 
        /* Short cut */
        ksession = session->kernel_session;
+       usess = session->ust_session;
 
        /* Kernel tracing */
        if (ksession != NULL) {
@@ -2553,12 +2554,14 @@ static int cmd_start_trace(struct ltt_session *session)
        }
 
        /* Flag session that trace should start automatically */
-       usess->start_trace = 1;
+       if (usess) {
+               usess->start_trace = 1;
 
-       ret = ust_app_start_trace_all(usess);
-       if (ret < 0) {
-               ret = LTTCOMM_UST_START_FAIL;
-               goto error;
+               ret = ust_app_start_trace_all(usess);
+               if (ret < 0) {
+                       ret = LTTCOMM_UST_START_FAIL;
+                       goto error;
+               }
        }
 
        ret = LTTCOMM_OK;
This page took 0.023894 seconds and 4 git commands to generate.