X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-commands.c;fp=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-commands.c;h=7f031e7427688e903df292ff0a7da7a1176dc023;hp=b1b33343ba5da6ec663a981d944e70f9256861c6;hb=8790759cef081ff562cff2b493e20a6a085f4b21;hpb=d2a28b277d9a6d5b95a298e400b9f9eab604f6f0 diff --git a/src/bin/lttng-sessiond/notification-thread-commands.c b/src/bin/lttng-sessiond/notification-thread-commands.c index b1b33343b..7f031e742 100644 --- a/src/bin/lttng-sessiond/notification-thread-commands.c +++ b/src/bin/lttng-sessiond/notification-thread-commands.c @@ -382,6 +382,32 @@ int notification_thread_client_communication_update( return run_command_no_wait(handle, &cmd); } +enum lttng_error_code notification_thread_command_get_trigger( + struct notification_thread_handle *handle, + const struct lttng_trigger *trigger, + struct lttng_trigger **real_trigger) +{ + int ret; + enum lttng_error_code ret_code; + struct notification_thread_command cmd = {}; + + init_notification_thread_command(&cmd); + + cmd.type = NOTIFICATION_COMMAND_TYPE_GET_TRIGGER; + cmd.parameters.get_trigger.trigger = trigger; + ret = run_command_wait(handle, &cmd); + if (ret) { + ret_code = LTTNG_ERR_UNK; + goto end; + } + + ret_code = cmd.reply_code; + *real_trigger = cmd.reply.get_trigger.trigger; + +end: + return ret_code; +} + /* * Takes ownership of the payload if present. */