From af0c318df128a05e708f704ec21c5d3cf8e314fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 9 Sep 2019 10:39:23 -0400 Subject: [PATCH] Fix: forward fatal error in evaluate_condition_for_client() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A fatal error during the evaluation of a condition on behalf of a client of a notification channel should be forwarded up the stack to the notification thread. Here, 'ret' is silently ignored assuming that a check of "evaluation" is equivalent, which is not the case. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/notification-thread-events.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index bdbac0c40..038716cf5 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -928,7 +928,10 @@ int evaluate_condition_for_client(const struct lttng_trigger *trigger, ret = -1; goto end; } - + if (ret) { + /* Fatal error. */ + goto end; + } if (!evaluation) { /* Evaluation yielded nothing. Normal exit. */ DBG("[notification-thread] Newly subscribed-to condition evaluated to false, nothing to report to client"); -- 2.34.1