Fix: Save jul event filter bytecode
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Feb 2015 20:07:09 +0000 (15:07 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Feb 2015 20:09:20 +0000 (15:09 -0500)
This fixes a regression introduced by 7ea8750c which caused the jul
event filter bytecode to be stored as NULL.

This caused the disable_event command to fail since it would fail to
lookup the JUL event (the event's filter being part of the HT's key).

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

index 84ee1a6e5e228330f9ef7b9656f8d9c64a1d0ff7..ceafa00e2c8f7a13eddc968e53ac9839d8027c14 100644 (file)
@@ -1479,7 +1479,6 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
                        &uevent, filter_expression, filter, NULL, wpipe);
                /* We have passed ownership */
                filter_expression = NULL;
-               filter = NULL;
                if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
                        goto error;
                }
@@ -1487,8 +1486,10 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain,
                /* The wild card * means that everything should be enabled. */
                if (strncmp(event->name, "*", 1) == 0 && strlen(event->name) == 1) {
                        ret = event_jul_enable_all(usess, event, filter);
+                       filter = NULL;
                } else {
                        ret = event_jul_enable(usess, event, filter);
+                       filter = NULL;
                }
                if (ret != LTTNG_OK) {
                        goto error;
This page took 0.027462 seconds and 4 git commands to generate.