Ensure that a filter is always passed with its filter expression
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Aug 2015 15:58:56 +0000 (11:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 1 Sep 2015 16:03:08 +0000 (12:03 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index ac489fa2fa7f946a7c65a8b81d8f4572323ea16d..532106c1a3839e3e0f9d01c30d7447db41439570 100644 (file)
@@ -1497,6 +1497,9 @@ static int _cmd_enable_event(struct ltt_session *session,
        assert(event);
        assert(channel_name);
 
+       /* If we have a filter, we must have its filter expression */
+       assert(!(!!filter_expression ^ !!filter));
+
        DBG("Enable event command for event \'%s\'", event->name);
 
        ret = validate_event_name(event->name);
This page took 0.035862 seconds and 4 git commands to generate.