Signed-off-by: David Goulet <dgoulet@efficios.com>
}
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);