static void trigger_destroy_ref(struct urcu_ref *ref)
{
struct lttng_trigger *trigger =
- container_of(ref, struct lttng_trigger, ref);
+ lttng::utils::container_of(ref, <tng_trigger::ref);
struct lttng_action *action = lttng_trigger_get_action(trigger);
struct lttng_condition *condition =
lttng_trigger_get_condition(trigger);
}
}
+ if (trigger_comm->is_hidden) {
+ lttng_trigger_set_hidden(trigger);
+ }
+
ret = offset;
error:
trigger_comm.name_length = size_name;
+ trigger_comm.is_hidden = lttng_trigger_is_hidden(trigger);
+
header_offset = payload->buffer.size;
ret = lttng_dynamic_buffer_append(&payload->buffer, &trigger_comm,
sizeof(trigger_comm));
void lttng_trigger_set_credentials(struct lttng_trigger *trigger,
const struct lttng_credentials *creds)
{
+ /* Triggers do not use the group id to authenticate the user. */
LTTNG_ASSERT(creds);
- trigger->creds = *creds;
+ LTTNG_OPTIONAL_SET(&trigger->creds.uid, LTTNG_OPTIONAL_GET(creds->uid));
+ LTTNG_OPTIONAL_UNSET(&trigger->creds.gid);
}
enum lttng_trigger_status lttng_trigger_set_owner_uid(