From 442f8c07a767f26de60946a469e0c028cc7d17cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 9 Feb 2016 15:16:49 -0500 Subject: [PATCH] Fix: Don't notify agent of non-app context addition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/context.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/context.c b/src/bin/lttng-sessiond/context.c index 1725c6a10..9a5738799 100644 --- a/src/bin/lttng-sessiond/context.c +++ b/src/bin/lttng-sessiond/context.c @@ -113,7 +113,13 @@ static int add_uctx_to_channel(struct ltt_ust_session *usess, case LTTNG_DOMAIN_JUL: case LTTNG_DOMAIN_LOG4J: { - struct agent *agt = trace_ust_find_agent(usess, domain); + struct agent *agt; + + if (ctx->ctx != LTTNG_EVENT_CONTEXT_APP_CONTEXT) { + /* Other contexts are not needed by the agent. */ + break; + } + agt = trace_ust_find_agent(usess, domain); if (!agt) { agt = agent_create(domain); -- 2.34.1