X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fconsumer.cpp;h=a482dde8aff041cee9502cd7be23cb1f73f5ee43;hb=8696b40b84aefe0800e9e5facb461ef4ad0fd370;hp=c0f8eb5894e8fae8cb070109d4820ebec62ddff2;hpb=8af3bd5768947013629cb38edbce0deed48c6c11;p=deliverable%2Flttng-tools.git diff --git a/src/bin/lttng-sessiond/consumer.cpp b/src/bin/lttng-sessiond/consumer.cpp index c0f8eb589..a482dde8a 100644 --- a/src/bin/lttng-sessiond/consumer.cpp +++ b/src/bin/lttng-sessiond/consumer.cpp @@ -17,9 +17,10 @@ #include #include -#include #include #include +#include +#include #include "consumer.hpp" #include "health-sessiond.hpp" @@ -935,7 +936,8 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg, const char *root_shm_path, const char *shm_path, struct lttng_trace_chunk *trace_chunk, - const struct lttng_credentials *buffer_credentials) + const struct lttng_credentials *buffer_credentials, + const lttng::trace_format_descriptor& trace_format) { LTTNG_ASSERT(msg); @@ -978,6 +980,11 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg, msg->u.ask_channel.monitor = monitor; msg->u.ask_channel.ust_app_uid = ust_app_uid; msg->u.ask_channel.blocking_timeout = blocking_timeout; + if (trace_format.type() == LTTNG_TRACE_FORMAT_DESCRIPTOR_TYPE_CTF_1) { + msg->u.ask_channel.trace_format = 1; + } else { + msg->u.ask_channel.trace_format = 2; + } std::copy(uuid.begin(), uuid.end(), msg->u.ask_channel.uuid); @@ -1020,7 +1027,8 @@ void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg, unsigned int live_timer_interval, bool is_in_live_session, unsigned int monitor_timer_interval, - struct lttng_trace_chunk *trace_chunk) + struct lttng_trace_chunk *trace_chunk, + const lttng::trace_format_descriptor& trace_format) { LTTNG_ASSERT(msg); @@ -1050,6 +1058,11 @@ void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg, msg->u.channel.live_timer_interval = live_timer_interval; msg->u.channel.is_live = is_in_live_session; msg->u.channel.monitor_timer_interval = monitor_timer_interval; + if (trace_format.type() == LTTNG_TRACE_FORMAT_DESCRIPTOR_TYPE_CTF_1) { + msg->u.channel.trace_format = 1; + } else { + msg->u.channel.trace_format = 2; + } strncpy(msg->u.channel.pathname, pathname, sizeof(msg->u.channel.pathname));