Fix: relayd protocol version
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · * Julien Desfossez ([email protected]) wrote:
Since we heritate the relayd protocol version from the sessiond and relayd version, use the VERSION macro instead of additionnal fields.
I merged these instead:
commit d83a952ce0d3a03bd3d36505d665db99b2c65fa2
Author: Mathieu Desnoyers <[email protected]> Date: Mon Aug 5 15:26:41 2013 -0400
relayd: use version macros from build rather than scanf
Acked-by Julien Desfossez <[email protected]>
Signed-off-by Mathieu Desnoyers <[email protected]>
commit 6947778efd60badf06cec2bd5c39d7f96f5ba7ad
Author: Mathieu Desnoyers <[email protected]> Date: Mon Aug 5 15:24:31 2013 -0400
sessiond: use version major/minor from build for communication with relayd
Acked-by Julien Desfossez <[email protected]>
Signed-off-by Mathieu Desnoyers <[email protected]>
commit 81265501f5370482b1ee9c24d3fa6537c5ca0389
Author: Mathieu Desnoyers <[email protected]> Date: Mon Aug 5 15:23:27 2013 -0400
build: export major/minor/patchlevel numbers
Acked-by Julien Desfossez <[email protected]>
Signed-off-by Mathieu Desnoyers <[email protected]>
Quoted 47 lines
Signed-off-by Julien Desfossez <[email protected]>--- src/bin/lttng-sessiond/cmd.c | 11 +++++++++-- src/common/sessiond-comm/relayd.h | 3 --- 2 files changed, 9 insertions(+), 5 deletions(-)src/bin/lttng-sessiond/cmd.c +9
-2@@ -491,9 +491,16 @@ static int create_connect_relayd(struct lttng_uri *uri, {int ret;struct lttcomm_relayd_sock *rsock; +uint32_t major, minor; - rsock =lttcomm_alloc_relayd_sock (uri,RELAYD_VERSION_COMM_MAJOR , -RELAYD_VERSION_COMM_MINOR ); + ret =sscanf (VERSION ,"%10u.%10u" , &major, &minor); +if (ret <2 ) { +ERR ("Error in scanning version" ); + ret =-1 ; + goto error; + } + + rsock =lttcomm_alloc_relayd_sock (uri, major, minor);if (!rsock) { ret =LTTNG_ERR_FATAL ; goto error;src/common/sessiond-comm/relayd.h +0
-3@@ -27,9 +27,6 @@#include <lttng/lttng.h> #include <common/defaults.h> -#define RELAYD_VERSION_COMM_MAJOR 2 -#define RELAYD_VERSION_COMM_MINOR 2 -/* * lttng-relayd communication header. */ Signature · 1 line
1.7.10.4
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com