Implement --shm-path option for UST sessions (per-uid channels)
[lttng-tools.git] / src / bin / lttng-sessiond / consumer.c
index b7394d97d2def451211fcf1d993d77350340ca8c..628201e07c0f4477eafb1079a5cd96cf0677ecee 100644 (file)
@@ -801,7 +801,8 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg,
                uint64_t tracefile_count,
                uint64_t session_id_per_pid,
                unsigned int monitor,
-               uint32_t ust_app_uid)
+               uint32_t ust_app_uid,
+               const char *shm_path)
 {
        assert(msg);
 
@@ -839,6 +840,12 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg,
 
        strncpy(msg->u.ask_channel.name, name, sizeof(msg->u.ask_channel.name));
        msg->u.ask_channel.name[sizeof(msg->u.ask_channel.name) - 1] = '\0';
+
+       if (shm_path) {
+               strncpy(msg->u.ask_channel.shm_path, shm_path,
+                       sizeof(msg->u.ask_channel.shm_path));
+               msg->u.ask_channel.shm_path[sizeof(msg->u.ask_channel.shm_path) - 1] = '\0';
+       }
 }
 
 /*
This page took 0.024376 seconds and 5 git commands to generate.