X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.cpp;h=f18bc68d44760c969b01c347500c90214c201982;hb=f40b76aed659ff694cf948bf8ebd1d4b5741c986;hp=58a38cce191d7b720861d14e8aa96161cfc7a008;hpb=56047f5a23df5c2c583a102b8015bbec5a7da9f1;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread-events.cpp b/src/bin/lttng-sessiond/notification-thread-events.cpp index 58a38cce1..f18bc68d4 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.cpp +++ b/src/bin/lttng-sessiond/notification-thread-events.cpp @@ -2502,8 +2502,6 @@ end: static bool is_trigger_action_notify(const struct lttng_trigger *trigger) { bool is_notify = false; - unsigned int i, count; - enum lttng_action_status action_status; const struct lttng_action *action = lttng_trigger_get_const_action(trigger); enum lttng_action_type action_type; @@ -2516,14 +2514,8 @@ static bool is_trigger_action_notify(const struct lttng_trigger *trigger) goto end; } - action_status = lttng_action_list_get_count(action, &count); - LTTNG_ASSERT(action_status == LTTNG_ACTION_STATUS_OK); - - for (i = 0; i < count; i++) { - const struct lttng_action *inner_action = lttng_action_list_get_at_index(action, i); - - action_type = lttng_action_get_type(inner_action); - if (action_type == LTTNG_ACTION_TYPE_NOTIFY) { + for (auto inner_action : lttng::ctl::const_action_list_view(action)) { + if (lttng_action_get_type(inner_action) == LTTNG_ACTION_TYPE_NOTIFY) { is_notify = true; goto end; } @@ -3324,12 +3316,12 @@ end: free(cmd); cmd = nullptr; } else { - lttng_waiter_wake_up(&cmd->reply_waiter); + lttng_waiter_wake(&cmd->reply_waiter); } return ret; error_unlock: /* Wake-up and return a fatal error to the calling thread. */ - lttng_waiter_wake_up(&cmd->reply_waiter); + lttng_waiter_wake(&cmd->reply_waiter); cmd->reply_code = LTTNG_ERR_FATAL; error: /* Indicate a fatal error to the caller. */