Fix: (slight UI change) refuse missing -c if non-default channel exists
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 19 Jul 2013 13:04:29 +0000 (09:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 19 Jul 2013 13:11:13 +0000 (09:11 -0400)
After a user creates a channel within a session, creating a "default"
channel if a user forgets to put "-c channel_name" in the following
add-context, enable-event, disable-event commands is misleading.  The
natural expected behavior would be that the command would apply the the
last enabled channel (notion of a "current" channel, like we have for
sessions), but certainly not that it creates a new channel with default
attributes behind the user's back.

An intermediate fix that would not require to keep a notion of current
channel is to refuse creation of a default channel if at least one
non-default channel has already been created in the session.

This commit affects enable-event, disable-event and add-context
commands.

This fix belongs to the 2.3-rc cycle, and cannot be backported, since
it:

a) changes the user interface of lttng (returns an error in the case
   where -c name is missing and the session contains an non-default
   channel)
b) changes the ABI between lttng-ctl and sessiond: a default channel is
   now expressed as an empty string ('\0') rather than by "channel0",
   which allows making the difference between an explicit "channel0"
   channel and a default channel in the session daemon.

Fixes #522

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.027645 seconds and 4 git commands to generate.