/* Create socket for control stream. */
if (uri->stype == LTTNG_STREAM_CONTROL) {
+ uint64_t result_flags;
+
DBG3("Creating relayd stream socket from URI");
/* Check relayd version */
}
consumer->relay_major_version = rsock->major;
consumer->relay_minor_version = rsock->minor;
+ ret = relayd_get_configuration(rsock, 0,
+ &result_flags);
+ if (ret < 0) {
+ ERR("Unable to get relayd configuration");
+ status = LTTNG_ERR_RELAYD_CONNECT_FAIL;
+ goto close_sock;
+ }
+ if (result_flags & LTTCOMM_RELAYD_CONFIGURATION_FLAG_CLEAR_ALLOWED) {
+ consumer->relay_allows_clear = true;
+ }
} else if (uri->stype == LTTNG_STREAM_DATA) {
DBG3("Creating relayd data socket from URI");
} else {
usess->consumer->relay_major_version;
session->consumer->relay_minor_version =
usess->consumer->relay_minor_version;
+ session->consumer->relay_allows_clear =
+ usess->consumer->relay_allows_clear;
}
if (ksess && ksess->consumer && ksess->consumer->type == CONSUMER_DST_NET
ksess->consumer->relay_major_version;
session->consumer->relay_minor_version =
ksess->consumer->relay_minor_version;
+ session->consumer->relay_allows_clear =
+ ksess->consumer->relay_allows_clear;
}
error:
output->snapshot = src->snapshot;
output->relay_major_version = src->relay_major_version;
output->relay_minor_version = src->relay_minor_version;
+ output->relay_allows_clear = src->relay_allows_clear;
memcpy(&output->dst, &src->dst, sizeof(output->dst));
ret = consumer_copy_sockets(output, src);
if (ret < 0) {
uint32_t relay_major_version;
uint32_t relay_minor_version;
+ /* True if relayd supports the clear feature. */
+ bool relay_allows_clear;
+
/*
* Subdirectory path name used for both local and network
* consumer ("kernel", "ust", or empty).