Move firing policy from lttng_trigger to lttng_action
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.c
index 4623ef38c463edb281a6eaaaedfdb8521dfb4db6..29318432f842b2f26193388aa563da350ed8ae04 100644 (file)
@@ -1152,6 +1152,7 @@ int notification_thread_client_subscribe(struct notification_client *client,
                        WARN("[notification-thread] Evaluation of a condition on client subscription failed, aborting.");
                        ret = -1;
                        free(client_list_element);
+                       pthread_mutex_unlock(&client_list->lock);
                        goto end;
                }
        }
@@ -4334,7 +4335,7 @@ int notification_client_list_send_evaluation(
                        }
                }
 
-               if (client->uid != lttng_credentials_get_uid(trigger_creds) && client->gid != lttng_credentials_get_gid(trigger_creds)) {
+               if (client->uid != lttng_credentials_get_uid(trigger_creds)) {
                        DBG("[notification-thread] Skipping client at it does not have the permission to receive notification for this trigger");
                        goto skip_client;
                }
@@ -4522,13 +4523,6 @@ int dispatch_one_event_notifier_notification(struct notification_thread_state *s
                        struct notification_trigger_tokens_ht_element,
                        node);
 
-       if (!lttng_trigger_should_fire(element->trigger)) {
-               ret = 0;
-               goto end_unlock;
-       }
-
-       lttng_trigger_fire(element->trigger);
-
        trigger_status = lttng_trigger_get_name(element->trigger, &trigger_name);
        assert(trigger_status == LTTNG_TRIGGER_STATUS_OK);
 
@@ -4840,12 +4834,6 @@ int handle_notification_thread_channel_sample(
                        goto put_list;
                }
 
-               if (!lttng_trigger_should_fire(trigger)) {
-                       goto put_list;
-               }
-
-               lttng_trigger_fire(trigger);
-
                /*
                 * Ownership of `evaluation` transferred to the action executor
                 * no matter the result.
This page took 0.024187 seconds and 4 git commands to generate.