trigger: consider domain on register and unregister
[lttng-tools.git] / src / lib / lttng-ctl / lttng-ctl.c
index 91d6109e5383b77f8013d67aad18b374d4e131ba..a295667fea7855e594645e99b5c24520ea5976ec 100644 (file)
@@ -2971,6 +2971,7 @@ int lttng_register_trigger(struct lttng_trigger *trigger)
        struct lttng_payload message;
        struct lttng_payload reply;
        struct lttng_trigger *reply_trigger = NULL;
        struct lttng_payload message;
        struct lttng_payload reply;
        struct lttng_trigger *reply_trigger = NULL;
+       enum lttng_domain_type domain_type;
        const struct lttng_credentials user_creds = {
                .uid = LTTNG_OPTIONAL_INIT_VALUE(geteuid()),
                .gid = LTTNG_OPTIONAL_INIT_UNSET,
        const struct lttng_credentials user_creds = {
                .uid = LTTNG_OPTIONAL_INIT_VALUE(geteuid()),
                .gid = LTTNG_OPTIONAL_INIT_UNSET,
@@ -3015,6 +3016,11 @@ int lttng_register_trigger(struct lttng_trigger *trigger)
                goto end;
        }
 
                goto end;
        }
 
+       domain_type = lttng_trigger_get_underlying_domain_type_restriction(
+                       trigger);
+
+       lsm.domain.type = domain_type;
+
        ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
        if (ret) {
                ret = -LTTNG_ERR_NOMEM;
        ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
        if (ret) {
                ret = -LTTNG_ERR_NOMEM;
This page took 0.031997 seconds and 4 git commands to generate.