Fix: mark channel as disabled even if the session is inactive
Observed issue
==============
When the session is stopped, disable-channel commands are no-op.
The following commands reproduce the issue:
lttng create
lttng enable-event -u -a
lttng start
sleep 4
lttng stop
lttng disable-channel -u channel0
sleep 10
lttng start
sleep 4
lttng stop
lttng view
Note that the sleep command there are to give the UST application time
to produce events.
Even after disabling the channel, we can see that events are still
traced.
This is due to the fact that the `channel_ust_disable()` function
returns early if the session is inactive and omits to set the channel as
disabled.
Proposed fix
============
Move this following line before the check:
uchan->enabled = 0;
Test
====
Add a test case to exercise this exact scenario.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9660064ac6eb99f2aea8851dc98a94cfc1b810e6
This page took 0.025842 seconds and 4 git commands to generate.