X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstop.c;fp=src%2Fbin%2Flttng%2Fcommands%2Fstop.c;h=f2ab453084f489cd38fe3cf2812a92278a05e296;hp=689fe1b04998f8451d8c5018670ab5d1b25f1f65;hb=ae8564917fa3cb3497ec17951d8ac0ee28de9c81;hpb=4747a49b20089e4ac15d02a5191bd6cca8567e2f diff --git a/src/bin/lttng/commands/stop.c b/src/bin/lttng/commands/stop.c index 689fe1b04..f2ab45308 100644 --- a/src/bin/lttng/commands/stop.c +++ b/src/bin/lttng/commands/stop.c @@ -61,7 +61,7 @@ static void usage(FILE *ofp) */ static int stop_tracing(void) { - int ret = CMD_SUCCESS; + int ret; char *session_name; if (opt_session_name == NULL) { @@ -76,9 +76,12 @@ static int stop_tracing(void) ret = lttng_stop_tracing(session_name); if (ret < 0) { + /* Don't set ret so lttng can interpret the sessiond error. */ goto free_name; } + ret = CMD_SUCCESS; + MSG("Tracing stopped for session %s", session_name); free_name: