Fix: forward fatal error in evaluate_condition_for_client()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Sep 2019 14:39:23 +0000 (10:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Sep 2019 14:39:23 +0000 (10:39 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/notification-thread-events.c

index bdbac0c4001f44f218ea0821eab5891972d35043..038716cf567c03e7b03cd8f9ae0d292f7696a7c4 100644 (file)
@@ -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");
This page took 0.025971 seconds and 4 git commands to generate.