action-executor: evaluated object credentials are optional
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 23 Sep 2020 20:13:37 +0000 (16:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 17 Nov 2020 20:23:57 +0000 (15:23 -0500)
Use the is_set member instead of the LTTNG_OPTIONAL_GET_PTR macro
which asserts whenever an optional member is unset.

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

src/bin/lttng-sessiond/action-executor.c

index 4f027fdb91b3e3b30ab8859a05fbf319739cefa7..5459c4b5e4876ef75f45f65e6c6c7344eef020e6 100644 (file)
@@ -198,7 +198,9 @@ static int action_executor_notify_handler(struct action_executor *executor,
                        lttng_trigger_get_const_condition(work_item->trigger),
                        work_item->evaluation,
                        lttng_trigger_get_credentials(work_item->trigger),
-                       LTTNG_OPTIONAL_GET_PTR(work_item->object_creds),
+                       work_item->object_creds.is_set ?
+                                       &(work_item->object_creds.value) :
+                                       NULL,
                        client_handle_transmission_status, executor);
 }
 
This page took 0.0254 seconds and 4 git commands to generate.