Remove error count property of lttng_condition_on_event
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.c
index 90fdadd61280bc2452063931ad1c7ca1fc837f8b..23614b0db65d0a776161bf821e0880677e092333 100644 (file)
@@ -1953,9 +1953,9 @@ int handle_notification_thread_command_session_rotation(
                 * Ownership of `evaluation` transferred to the action executor
                 * no matter the result.
                 */
-               executor_status = action_executor_enqueue(state->executor,
-                               trigger, evaluation, &session_creds,
-                               client_list);
+               executor_status = action_executor_enqueue_trigger(
+                               state->executor, trigger, evaluation,
+                               &session_creds, client_list);
                evaluation = NULL;
                switch (executor_status) {
                case ACTION_EXECUTOR_STATUS_OK:
@@ -2174,40 +2174,6 @@ end:
        return ret;
 }
 
-static
-int condition_on_event_update_error_count(struct lttng_trigger *trigger)
-{
-       int ret = 0;
-       uint64_t error_count = 0;
-       struct lttng_condition *condition;
-       enum event_notifier_error_accounting_status status;
-
-       condition = lttng_trigger_get_condition(trigger);
-       assert(lttng_condition_get_type(condition) ==
-                       LTTNG_CONDITION_TYPE_ON_EVENT);
-
-       status = event_notifier_error_accounting_get_count(trigger, &error_count);
-       if (status != EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK) {
-               uid_t trigger_owner_uid;
-               const char *trigger_name;
-               const enum lttng_trigger_status trigger_status =
-                               lttng_trigger_get_owner_uid(
-                                               trigger, &trigger_owner_uid);
-
-               assert(trigger_status == LTTNG_TRIGGER_STATUS_OK);
-               if (lttng_trigger_get_name(trigger, &trigger_name) != LTTNG_TRIGGER_STATUS_OK) {
-                       trigger_name = "(unnamed)";
-               }
-
-               ERR("Failed to get event notifier error count of trigger for update: trigger owner = %d, trigger name = '%s'",
-                               trigger_owner_uid, trigger_name);
-               ret = -1;
-       }
-
-       lttng_condition_on_event_set_error_count(condition, error_count);
-       return ret;
-}
-
 int handle_notification_thread_remove_tracer_event_source_no_result(
                struct notification_thread_state *state,
                int tracer_event_source_fd)
@@ -2255,12 +2221,6 @@ static int handle_notification_thread_command_list_triggers(
                        continue;
                }
 
-               if (lttng_trigger_needs_tracer_notifier(trigger_ht_element->trigger)) {
-                       ret = condition_on_event_update_error_count(
-                                       trigger_ht_element->trigger);
-                       assert(!ret);
-               }
-
                ret = lttng_triggers_add(local_triggers,
                                trigger_ht_element->trigger);
                if (ret < 0) {
@@ -2917,8 +2877,8 @@ int handle_notification_thread_command_register_trigger(
         * Ownership of `evaluation` transferred to the action executor
         * no matter the result.
         */
-       executor_status = action_executor_enqueue(state->executor, trigger,
-                       evaluation, &object_creds, client_list);
+       executor_status = action_executor_enqueue_trigger(state->executor,
+                       trigger, evaluation, &object_creds, client_list);
        evaluation = NULL;
        switch (executor_status) {
        case ACTION_EXECUTOR_STATUS_OK:
@@ -4638,7 +4598,7 @@ int dispatch_one_event_notifier_notification(struct notification_thread_state *s
        }
        client_list = get_client_list_from_condition(state,
                        lttng_trigger_get_const_condition(element->trigger));
-       executor_status = action_executor_enqueue(state->executor,
+       executor_status = action_executor_enqueue_trigger(state->executor,
                        element->trigger, evaluation, NULL, client_list);
        switch (executor_status) {
        case ACTION_EXECUTOR_STATUS_OK:
@@ -4921,9 +4881,9 @@ int handle_notification_thread_channel_sample(
                 * Ownership of `evaluation` transferred to the action executor
                 * no matter the result.
                 */
-               executor_status = action_executor_enqueue(state->executor,
-                               trigger, evaluation, &channel_creds,
-                               client_list);
+               executor_status = action_executor_enqueue_trigger(
+                               state->executor, trigger, evaluation,
+                               &channel_creds, client_list);
                evaluation = NULL;
                switch (executor_status) {
                case ACTION_EXECUTOR_STATUS_OK:
This page took 0.025261 seconds and 4 git commands to generate.