From: Jérémie Galarneau Date: Mon, 9 Sep 2019 14:39:23 +0000 (-0400) Subject: Fix: forward fatal error in evaluate_condition_for_client() X-Git-Tag: v2.12.0-rc1~430 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=af0c318df128a05e708f704ec21c5d3cf8e314fa Fix: forward fatal error in evaluate_condition_for_client() 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 --- 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");