From: Mathieu Desnoyers Date: Thu, 14 Jun 2012 14:43:04 +0000 (-0400) Subject: Fix: enable event with different loglevel error X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=a027b2d2edced8011ef674f88146253715952af7;hp=a027b2d2edced8011ef674f88146253715952af7;p=lttng-tools.git 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 Signed-off-by: David Goulet Signed-off-by: Mathieu Desnoyers ---