Merge LTTng commit c6485006a92b1b86fbb48c2b277732d3405295c9
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2011 16:05:27 +0000 (12:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2011 16:05:27 +0000 (12:05 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libust/ltt-events.c

index a94e8f9a1dde6a6e315133e59c66e3659455f99d..42d486c195d73c8cdfd265b6a54a5d2bd20950ec 100644 (file)
@@ -139,6 +139,8 @@ int ltt_channel_enable(struct ltt_channel *channel)
 {
        int old;
 
+       if (channel == channel->session->metadata)
+               return -EPERM;
        old = xchg(&channel->enabled, 1);
        if (old)
                return -EEXIST;
@@ -149,6 +151,8 @@ int ltt_channel_disable(struct ltt_channel *channel)
 {
        int old;
 
+       if (channel == channel->session->metadata)
+               return -EPERM;
        old = xchg(&channel->enabled, 0);
        if (!old)
                return -EEXIST;
@@ -159,6 +163,8 @@ int ltt_event_enable(struct ltt_event *event)
 {
        int old;
 
+       if (event->chan == event->chan->session->metadata)
+               return -EPERM;
        old = xchg(&event->enabled, 1);
        if (old)
                return -EEXIST;
@@ -169,6 +175,8 @@ int ltt_event_disable(struct ltt_event *event)
 {
        int old;
 
+       if (event->chan == event->chan->session->metadata)
+               return -EPERM;
        old = xchg(&event->enabled, 0);
        if (!old)
                return -EEXIST;
This page took 0.0651 seconds and 4 git commands to generate.