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:46:43 +0000 (13:46 -0400)
commita027b2d2edced8011ef674f88146253715952af7
tree828aafabfed3157580e4909ef6ebec43794f057b
parent3a5713dad195a7cfa3f4866ad2c75f3a83d73a2f
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.025975 seconds and 4 git commands to generate.