From dda67f6c1ffa2bd1bb106b21d1ee353a4c1245f8 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 22 Oct 2012 17:24:40 -0400 Subject: [PATCH] Fix: Error handling when sending relayd sockets to consumer Signed-off-by: David Goulet --- src/bin/lttng-sessiond/cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index f72d4bb17..260cff671 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -584,7 +584,7 @@ close_sock: static int send_consumer_relayd_sockets(int domain, struct ltt_session *session, struct consumer_output *consumer, int fd) { - int ret; + int ret = LTTNG_OK; assert(session); assert(consumer); @@ -640,7 +640,7 @@ static int setup_relayd(struct ltt_session *session) assert(socket->fd >= 0); pthread_mutex_lock(socket->lock); - send_consumer_relayd_sockets(LTTNG_DOMAIN_UST, session, + ret = send_consumer_relayd_sockets(LTTNG_DOMAIN_UST, session, usess->consumer, socket->fd); pthread_mutex_unlock(socket->lock); if (ret != LTTNG_OK) { @@ -657,7 +657,7 @@ static int setup_relayd(struct ltt_session *session) assert(socket->fd >= 0); pthread_mutex_lock(socket->lock); - send_consumer_relayd_sockets(LTTNG_DOMAIN_KERNEL, session, + ret = send_consumer_relayd_sockets(LTTNG_DOMAIN_KERNEL, session, ksess->consumer, socket->fd); pthread_mutex_unlock(socket->lock); if (ret != LTTNG_OK) { -- 2.34.1