Fix: print ret value on ust_app start/stop error
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index dd8d103fd1d9c2773fe9f032d1389cedd09f32d3..98ea50fdb250a6f0f89b2c73240eb7dea4df05d9 100644 (file)
@@ -2350,7 +2350,7 @@ skip_setup:
        /* This start the UST tracing */
        ret = ustctl_start_session(app->sock, ua_sess->handle);
        if (ret < 0) {
-               ERR("Error starting tracing for app pid: %d", app->pid);
+               ERR("Error starting tracing for app pid: %d (ret: %d)", app->pid, ret);
                goto error_rcu_unlock;
        }
 
@@ -2402,7 +2402,7 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app)
         * from either the application manager thread or the command thread. Simply
         * indicate that this is a stop error.
         */
-       if (ua_sess->started == 1) {
+       if (!ua_sess->started) {
                goto error_rcu_unlock;
        }
 
@@ -2411,7 +2411,7 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app)
        /* This inhibits UST tracing */
        ret = ustctl_stop_session(app->sock, ua_sess->handle);
        if (ret < 0) {
-               ERR("Error stopping tracing for app pid: %d", app->pid);
+               ERR("Error stopping tracing for app pid: %d (ret: %d)", app->pid, ret);
                goto error_rcu_unlock;
        }
 
This page took 0.023665 seconds and 4 git commands to generate.