Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
{
int old;
+ if (channel == channel->session->metadata)
+ return -EPERM;
old = xchg(&channel->enabled, 1);
if (old)
return -EEXIST;
{
int old;
+ if (channel == channel->session->metadata)
+ return -EPERM;
old = xchg(&channel->enabled, 0);
if (!old)
return -EEXIST;
{
int old;
+ if (event->chan == event->chan->session->metadata)
+ return -EPERM;
old = xchg(&event->enabled, 1);
if (old)
return -EEXIST;
{
int old;
+ if (event->chan == event->chan->session->metadata)
+ return -EPERM;
old = xchg(&event->enabled, 0);
if (!old)
return -EEXIST;