X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-commands.c;h=28ed0b339d16c07e9d65763ff572a39a6e830945;hp=a3b41f989e72d5de6e116af5f5730a03f8f05c33;hb=242388e491e4219f967ee424d7bf02035a313e6f;hpb=0ab399e0bcf4e99492845f02e3e5b405155dea92 diff --git a/src/bin/lttng-sessiond/notification-thread-commands.c b/src/bin/lttng-sessiond/notification-thread-commands.c index a3b41f989..28ed0b339 100644 --- a/src/bin/lttng-sessiond/notification-thread-commands.c +++ b/src/bin/lttng-sessiond/notification-thread-commands.c @@ -117,9 +117,11 @@ enum lttng_error_code notification_thread_command_register_trigger( enum lttng_error_code ret_code; struct notification_thread_command cmd = {}; + assert(trigger); init_notification_thread_command(&cmd); cmd.type = NOTIFICATION_COMMAND_TYPE_REGISTER_TRIGGER; + lttng_trigger_get(trigger); cmd.parameters.trigger = trigger; ret = run_command_wait(handle, &cmd); @@ -280,3 +282,18 @@ void notification_thread_command_quit( ret = run_command_wait(handle, &cmd); assert(!ret && cmd.reply_code == LTTNG_OK); } + +int notification_thread_client_communication_update( + struct notification_thread_handle *handle, + notification_client_id id, + enum client_transmission_status transmission_status) +{ + struct notification_thread_command cmd = {}; + + init_notification_thread_command(&cmd); + + cmd.type = NOTIFICATION_COMMAND_TYPE_CLIENT_COMMUNICATION_UPDATE; + cmd.parameters.client_communication_update.id = id; + cmd.parameters.client_communication_update.status = transmission_status; + return run_command_no_wait(handle, &cmd); +}