+ session_live_mode = sessions[i].live_timer_interval;
+
+ DBG("Session live mode set to %d", session_live_mode);
+
+ if (sessions[i].enabled && !session_live_mode) {
+ WARN("Session %s is running. Please stop it before reading it.",
+ session_name);
+ ret = CMD_ERROR;
+ goto free_sessions;
+ }
+
+ /* If the timer interval is set we are in live mode. */
+ if (session_live_mode) {
+ trace_path = build_live_path(session_name);
+ if (!trace_path) {
+ ret = CMD_ERROR;
+ goto free_sessions;
+ }
+ } else {
+ /* Get file system session path. */
+ trace_path = sessions[i].path;
+ }