Fix: Error handling when sending relayd sockets to consumer
authorDavid Goulet <dgoulet@efficios.com>
Mon, 22 Oct 2012 21:24:40 +0000 (17:24 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 22 Oct 2012 21:24:48 +0000 (17:24 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c

index f72d4bb17a3c353a31b4f55ac49aaedc87744eef..260cff6715b2b0a4e9da948d97056e640664e448 100644 (file)
@@ -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) {
This page took 0.035266 seconds and 4 git commands to generate.