#include <common/common.hpp>
#include <common/defaults.hpp>
-#include <common/uri.hpp>
#include <common/relayd/relayd.hpp>
#include <common/string-utils/format.hpp>
+#include <common/uri.hpp>
+#include <lttng/trace-format-descriptor-internal.hpp>
#include "consumer.hpp"
#include "health-sessiond.hpp"
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);
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);
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);
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));