Fix: enable event with different loglevel error
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jun 2012 14:43:04 +0000 (10:43 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 14 Jun 2012 17:51:18 +0000 (13:51 -0400)
commitc0657016bbb98e1769edbaba8c00221f964c7402
treebcbe8fdf830dd964a26534e2e6ee3785147a8125
parentafbc6a134cddbfe0721af8e4ec93702804603d62
Fix: enable event with different loglevel error

This following example was NOT returning a correct error message.
"event1" is set with a loglevel "TRACE_CRIT". The normal behavior here
is that once enabled, you can not change the loglevel of the enable
event on the tracer side with a second command. It now returns a new
error message like so:

$ lttng enable-event event1 --loglevel-only TRACE-CRIT -u
$ lttng enable-event event1 --loglevel-only TRACE-WARNING -u
[...] Event already enabled with different loglevel

This commit makes the session daemon verify if _both_ the name and
loglevel are the same when enabling an event or else an error is
returned.

Also, the session daemon will continue enabling events and not return an
error is the loglevel does not match event for ust app on the tracer
which returns an EPERM at that stage. This is to address the case where
two applications have the same event name but with different loglevel.

Reported-by: Tan Dung Le Tran <tan.dung.le.tran@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/man/lttng.1
src/bin/lttng-sessiond/event.c
src/bin/lttng-sessiond/ust-app.c
src/common/sessiond-comm/sessiond-comm.c
src/common/sessiond-comm/sessiond-comm.h
This page took 0.025541 seconds and 4 git commands to generate.