#include <common/dynamic-array.hpp>
#include <common/macros.hpp>
#include <common/optional.hpp>
#include <common/dynamic-array.hpp>
#include <common/macros.hpp>
#include <common/optional.hpp>
action_status = lttng_action_start_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
action_status = lttng_action_start_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
action_status = lttng_action_stop_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
action_status = lttng_action_stop_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
action_status = lttng_action_rotate_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
action_status = lttng_action_rotate_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
/*
* Validate if, at the moment the action was queued, the target session
* existed. If not, skip the action altogether.
/*
* Validate if, at the moment the action was queued, the target session
* existed. If not, skip the action altogether.
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",