From: Jérémie Galarneau Date: Mon, 9 Feb 2015 20:07:09 +0000 (-0500) Subject: Fix: Save jul event filter bytecode X-Git-Tag: v2.5.5~29 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=42f626e843c5b67edeef6499adc146def3239aeb;p=lttng-tools.git Fix: Save jul event filter bytecode 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 --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 84ee1a6e5..ceafa00e2 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -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;