Steps to reproduce problem:
lttng create
lttng enable-event -u -a
lttng start
lttng start
lttng stop
Yield:
Session auto-
20200106-134455 created.
Traces will be output to /home/joraj/lttng-traces/auto-
20200106-134455
All UST events are enabled in channel channel0
Tracing started for session auto-
20200106-134455
Warning: Tracing already started for session auto-
20200106-134455
Warning: Tracing already stopped for session auto-
20200106-134455
The "warning" on the "lttng stop" command is invalid.
This was introduced by commit
1f4962443 Fix: sessiond: no rotation performed from null chunk to new chunk
For cases where the session is already active, simply skip all the way to
the end without passing via the error handling path.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: Iaf26090191d3eb940fa419848df8911758e0a6e3
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
/* Is the session already started? */
if (session->active) {
ret = LTTNG_ERR_TRACE_ALREADY_STARTED;
- goto error;
+ /* Perform nothing */
+ goto end;
}
if (session->rotation_state == LTTNG_ROTATION_STATE_ONGOING &&
session->cleared_after_last_stop =
session_cleared_after_last_stop;
}
+end:
return ret;
}