lttng enable-channel memsets lttng_channel to -1
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Mar 2016 03:35:23 +0000 (22:35 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Mar 2016 03:35:23 +0000 (22:35 -0500)
The lttng enable-channel command uses a global
struct lttng_channel which it initializes to contain all "-1".

This is a hack used to set tag all attributes as "unset" which
has the unfortunate consequence of setting the extended pointer
to a non-sensical value. This workaround explicitly sets the
extended pointer to NULL, but this command should be refactored so
it is no longer necessary.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/enable_channels.c

index 673fecfc57a0aeb394135b3b92a9e2c1d350ec82..696b8e0947ad20ca48e8b1ef3d5913d45b32f6c1 100644 (file)
@@ -380,6 +380,7 @@ static void init_channel_config(void)
         * those needed to be set by the default values.
         */
        memset(&chan.attr, -1, sizeof(chan.attr));
+       chan.attr.extended.ptr = NULL;
 }
 
 /*
This page took 0.025204 seconds and 4 git commands to generate.