Use lttng_trigger_is_equal when iterating over the trigger ht
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 13 Jan 2020 18:40:12 +0000 (13:40 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Dec 2020 17:25:37 +0000 (12:25 -0500)
Since a trigger can now have other type of actions then the notify one,
we must account for it. We use lttng_trigger_equal to perform that task.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I3300b0fff66e760152c1f7065d8fbfb945cce48e

src/bin/lttng-sessiond/notification-thread-events.c

index c318f833c87f6f2930b1090b384f31cea3d62013..7ba78ba312536435c5adb41737612122794bea48 100644 (file)
@@ -2598,13 +2598,7 @@ int handle_notification_thread_command_unregister_trigger(
 
                cds_list_for_each_entry_safe(trigger_element, tmp,
                                &trigger_list->list, node) {
-                       const struct lttng_condition *current_condition =
-                                       lttng_trigger_get_const_condition(
-                                               trigger_element->trigger);
-
-                       assert(current_condition);
-                       if (!lttng_condition_is_equal(condition,
-                                       current_condition)) {
+                       if (!lttng_trigger_is_equal(trigger, trigger_element->trigger)) {
                                continue;
                        }
 
This page took 0.0277 seconds and 4 git commands to generate.