From: David Goulet Date: Tue, 29 Jul 2014 18:11:48 +0000 (-0400) Subject: Fix: disable JUL event on destroy X-Git-Tag: v2.4.3~55 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=7993ef2cd364e90302d17830a569e761cb46f67a;p=lttng-tools.git Fix: disable JUL event on destroy Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/jul.c b/src/bin/lttng-sessiond/jul.c index 7bb0d75bc..392e289b7 100644 --- a/src/bin/lttng-sessiond/jul.c +++ b/src/bin/lttng-sessiond/jul.c @@ -869,6 +869,15 @@ void jul_destroy_domain(struct jul_domain *dom) rcu_read_lock(); cds_lfht_for_each_entry(dom->events->ht, &iter.iter, node, node) { int ret; + struct jul_event *event; + + /* + * When destroying an event, we have to try to disable it on the agent + * side so the event stops generating data. The return value is not + * important since we have to continue anyway destroying the object. + */ + event = caa_container_of(node, struct jul_event, node); + (void) jul_disable_event(event); ret = lttng_ht_del(dom->events, &iter); assert(!ret);