* Else, it's stays untouched and a lttcomm error code is returned.
*/
static int create_connect_relayd(struct lttng_uri *uri,
- struct lttcomm_relayd_sock **relayd_sock)
+ struct lttcomm_relayd_sock **relayd_sock,
+ struct consumer_output *consumer)
{
int ret;
struct lttcomm_relayd_sock *rsock;
ret = LTTNG_ERR_RELAYD_VERSION_FAIL;
goto close_sock;
}
+ consumer->relay_major_version = rsock->major;
+ consumer->relay_minor_version = rsock->minor;
} else if (uri->stype == LTTNG_STREAM_DATA) {
DBG3("Creating relayd data socket from URI");
} else {
struct lttcomm_relayd_sock *rsock = NULL;
/* Connect to relayd and make version check if uri is the control. */
- ret = create_connect_relayd(relayd_uri, &rsock);
+ ret = create_connect_relayd(relayd_uri, &rsock, consumer);
if (ret != LTTNG_OK) {
goto error;
}
/* Session is now ready for network streaming. */
session->net_handle = 1;
}
+ session->consumer->relay_major_version =
+ usess->consumer->relay_major_version;
+ session->consumer->relay_minor_version =
+ usess->consumer->relay_minor_version;
}
if (ksess && ksess->consumer && ksess->consumer->type == CONSUMER_DST_NET
/* Session is now ready for network streaming. */
session->net_handle = 1;
}
+ session->consumer->relay_major_version =
+ ksess->consumer->relay_major_version;
+ session->consumer->relay_minor_version =
+ ksess->consumer->relay_minor_version;
}
error:
output->net_seq_index = obj->net_seq_index;
memcpy(output->subdir, obj->subdir, PATH_MAX);
output->snapshot = obj->snapshot;
+ output->relay_major_version = obj->relay_major_version;
+ output->relay_minor_version = obj->relay_minor_version;
memcpy(&output->dst, &obj->dst, sizeof(output->dst));
ret = consumer_copy_sockets(output, obj);
if (ret < 0) {
* index. The relayd sockets are index with it on the consumer side.
*/
uint64_t net_seq_index;
+ /* Store the relay protocol in use if the session is remote. */
+ uint32_t relay_major_version;
+ uint32_t relay_minor_version;
/*
* Subdirectory path name used for both local and network consumer.