From: David Goulet Date: Tue, 25 Jun 2013 16:03:20 +0000 (-0400) Subject: Fix: don't stop a session that was not previously started X-Git-Tag: v2.2.0~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d39829a1f4d1e656561e05bcd9c4d43d9e9a5579;p=lttng-tools.git Fix: don't stop a session that was not previously started Fixes #567 Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index cbf2bceff..9b7306b79 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1553,7 +1553,7 @@ int cmd_stop_trace(struct ltt_session *session) session->enabled = 0; /* Kernel tracer */ - if (ksession) { + if (ksession && ksession->started) { DBG("Stop kernel tracing"); /* Flush metadata if exist */ @@ -1583,7 +1583,7 @@ int cmd_stop_trace(struct ltt_session *session) ksession->started = 0; } - if (usess) { + if (usess && usess->start_trace) { usess->start_trace = 0; ret = ust_app_stop_trace_all(usess);