X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=effa5f86f38cfa67247fdbd17a214c34f42c5703;hb=847a5916c26ab9cc0dfc9322cccd2c748c54747e;hp=0af994fc421c5b00c4ca11615cee2c9220aa5466;hpb=d07ceecd2f35ccf383c7529a18dcc9b9c4b8cb17;p=lttng-tools.git diff --git a/src/common/consumer.c b/src/common/consumer.c index 0af994fc4..effa5f86f 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -936,7 +936,9 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key, uint64_t tracefile_count, uint64_t session_id_per_pid, unsigned int monitor, - unsigned int live_timer_interval) + unsigned int live_timer_interval, + const char *root_shm_path, + const char *shm_path) { struct lttng_consumer_channel *channel; @@ -993,6 +995,15 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key, strncpy(channel->name, name, sizeof(channel->name)); channel->name[sizeof(channel->name) - 1] = '\0'; + if (root_shm_path) { + strncpy(channel->root_shm_path, root_shm_path, sizeof(channel->root_shm_path)); + channel->root_shm_path[sizeof(channel->root_shm_path) - 1] = '\0'; + } + if (shm_path) { + strncpy(channel->shm_path, shm_path, sizeof(channel->shm_path)); + channel->shm_path[sizeof(channel->shm_path) - 1] = '\0'; + } + lttng_ht_node_init_u64(&channel->node, channel->key); channel->wait_fd = -1;