X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=53f1b49ce14608e41aa1f82d21894358bb8dcfe3;hb=e9accd4fad532b481ff23af1ef2202c1b5a43c70;hp=3b9f6708a3685e61e0a6918e94732046a9b9151f;hpb=994fa64fa6931b256e76caef3d35a9caf1a3d2a6;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 3b9f6708a..53f1b49ce 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1187,12 +1187,8 @@ int relay_send_version(struct lttcomm_relayd_hdr *recv_hdr, goto end; } - ret = sscanf(VERSION, "%10u.%10u", &reply.major, &reply.minor); - if (ret < 2) { - ERR("Error in scanning version"); - ret = -1; - goto end; - } + reply.major = RELAYD_VERSION_COMM_MAJOR; + reply.minor = RELAYD_VERSION_COMM_MINOR; /* Major versions must be the same */ if (reply.major != be32toh(msg.major)) { @@ -2114,6 +2110,9 @@ int main(int argc, char **argv) /* Set up max poll set size */ lttng_poll_set_max_size(); + /* Initialize communication library */ + lttcomm_init(); + /* Setup the dispatcher thread */ ret = pthread_create(&dispatcher_thread, NULL, relay_thread_dispatcher, (void *) NULL);