Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I5d44b508a2a5211894c0cc7b6d51a9a03dc8b3f2
-int cmd_list_triggers(struct command_ctx *cmd_ctx,
+enum lttng_error_code cmd_list_triggers(struct command_ctx *cmd_ctx,
struct notification_thread_handle *notification_thread,
struct lttng_triggers **return_triggers)
{
struct notification_thread_handle *notification_thread,
struct lttng_triggers **return_triggers)
{
enum lttng_error_code ret_code;
struct lttng_triggers *triggers = NULL;
enum lttng_error_code ret_code;
struct lttng_triggers *triggers = NULL;
ret_code = notification_thread_command_list_triggers(
notification_thread, cmd_ctx->creds.uid, &triggers);
if (ret_code != LTTNG_OK) {
ret_code = notification_thread_command_list_triggers(
notification_thread, cmd_ctx->creds.uid, &triggers);
if (ret_code != LTTNG_OK) {
goto end;
}
*return_triggers = triggers;
triggers = NULL;
goto end;
}
*return_triggers = triggers;
triggers = NULL;
end:
lttng_triggers_destroy(triggers);
end:
lttng_triggers_destroy(triggers);
}
enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cmd_creds,
}
enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cmd_creds,
const struct lttng_trigger *trigger,
struct notification_thread_handle *notification_thread_handle);
const struct lttng_trigger *trigger,
struct notification_thread_handle *notification_thread_handle);
-int cmd_list_triggers(struct command_ctx *cmd_ctx,
+enum lttng_error_code cmd_list_triggers(struct command_ctx *cmd_ctx,
struct notification_thread_handle *notification_thread_handle,
struct lttng_triggers **return_triggers);
enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cmd_creds,
struct notification_thread_handle *notification_thread_handle,
struct lttng_triggers **return_triggers);
enum lttng_error_code cmd_execute_error_query(const struct lttng_credentials *cmd_creds,