notification: transmit originating trigger as part of evaluation
[lttng-tools.git] / src / bin / lttng-sessiond / action-executor.c
index 2a0aab45c962db46f9e9f499a7bdaca3420bd98a..86bada257634b90a8d0ebd7dc225732602b12e48 100644 (file)
 #include <common/optional.h>
 #include <lttng/action/action-internal.h>
 #include <lttng/action/group.h>
+#include <lttng/action/notify-internal.h>
 #include <lttng/action/notify.h>
 #include <lttng/action/rotate-session.h>
 #include <lttng/action/snapshot-session.h>
 #include <lttng/action/start-session.h>
 #include <lttng/action/stop-session.h>
 #include <lttng/condition/evaluation.h>
-#include <lttng/condition/event-rule-internal.h>
+#include <lttng/condition/on-event-internal.h>
 #include <lttng/lttng-error.h>
 #include <lttng/trigger/trigger-internal.h>
 #include <pthread.h>
@@ -196,9 +197,8 @@ static int action_executor_notify_handler(struct action_executor *executor,
                const struct lttng_action *action)
 {
        return notification_client_list_send_evaluation(work_item->client_list,
-                       lttng_trigger_get_const_condition(work_item->trigger),
+                       work_item->trigger,
                        work_item->evaluation,
-                       lttng_trigger_get_credentials(work_item->trigger),
                        work_item->object_creds.is_set ?
                                        &(work_item->object_creds.value) :
                                        NULL,
@@ -425,9 +425,9 @@ static int action_executor_snapshot_session_handler(struct action_executor *exec
        session_lock_list();
        session = session_find_by_name(session_name);
        if (!session) {
-               DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%p`",
+               DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
                                session_name, get_action_name(action),
-                   work_item->trigger);
+                               get_trigger_name(work_item->trigger));
                goto error_unlock_list;
        }
 
@@ -501,7 +501,7 @@ static int action_executor_generic_handler(struct action_executor *executor,
 
        assert(action_type != LTTNG_ACTION_TYPE_UNKNOWN);
 
-       DBG("Executing action `%s` of trigger `%p` action work item %" PRIu64,
+       DBG("Executing action `%s` of trigger `%s` action work item %" PRIu64,
                        get_action_name(action),
                        get_trigger_name(work_item->trigger),
                        work_item->id);
@@ -692,7 +692,7 @@ enum action_executor_status action_executor_enqueue(
 
        work_item = zmalloc(sizeof(*work_item));
        if (!work_item) {
-               PERROR("Failed to allocate action executor work item on behalf of trigger `%p`",
+               PERROR("Failed to allocate action executor work item on behalf of trigger `%s`",
                                get_trigger_name(trigger));
                executor_status = ACTION_EXECUTOR_STATUS_ERROR;
                goto error_unlock;
@@ -723,7 +723,7 @@ enum action_executor_status action_executor_enqueue(
        evaluation = NULL;
        cds_list_add_tail(&work_item->list_node, &executor->work.list);
        executor->work.pending_count++;
-       DBG("Enqueued action for trigger `%p` as work item %" PRIu64,
+       DBG("Enqueued action for trigger `%s` as work item #%" PRIu64,
                        get_trigger_name(trigger), work_item_id);
        signal = true;
 
This page took 0.024476 seconds and 4 git commands to generate.