summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7062f07)
This allows the sessiond to know which version of the protocol is
currently in use with the relay (useful for the metadata regeneration
checks).
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
* Else, it's stays untouched and a lttcomm error code is returned.
*/
static int create_connect_relayd(struct lttng_uri *uri,
* 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;
{
int ret;
struct lttcomm_relayd_sock *rsock;
ret = LTTNG_ERR_RELAYD_VERSION_FAIL;
goto close_sock;
}
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 {
} 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. */
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;
}
if (ret != LTTNG_OK) {
goto error;
}
/* Session is now ready for network streaming. */
session->net_handle = 1;
}
/* 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
}
if (ksess && ksess->consumer && ksess->consumer->type == CONSUMER_DST_NET
/* Session is now ready for network streaming. */
session->net_handle = 1;
}
/* 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;
output->net_seq_index = obj->net_seq_index;
memcpy(output->subdir, obj->subdir, PATH_MAX);
output->snapshot = obj->snapshot;
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) {
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;
* 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.
/*
* Subdirectory path name used for both local and network consumer.