X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fview.c;h=68ee4fa3ea1ec11343f07b40860bf3be03e85a2b;hp=dd3c9a3cc225b06d2ff055fdfb7acdfe0bc141ef;hb=3822545da613a8add254dcff34ca879cf8fce7fc;hpb=5bcdda4ff7e938d320b497470c8c33c84e996370 diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index dd3c9a3cc..68ee4fa3e 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -339,17 +339,17 @@ static int view_trace(void) } trace_path = sessions[i].path; + + if (sessions[i].enabled) { + WARN("Session %s is running. Please stop it before reading it.", + session_name); + ret = CMD_ERROR; + goto free_sessions; + } } else { trace_path = opt_trace_path; } - if (sessions[i].enabled) { - WARN("Session %s is running. Please stop it before reading it.", - session_name); - ret = CMD_ERROR; - goto free_sessions; - } - MSG("Trace directory: %s\n", trace_path); ret = spawn_viewer(trace_path);