Fix: communication error unreported in relay_rotate_session_streams
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 11 Sep 2019 00:08:30 +0000 (20:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 11 Sep 2019 00:12:10 +0000 (20:12 -0400)
'ret' is set to 0 even if the communication with the relay daemon
fails in relay_rotate_session_streams().

This also fixes a dead-assignment warning.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/main.c

index 62a5bd7cefc16026ff05f3e3741e4b4258837fd1..0cd163fe85eae4028ce025c0cd1a5d35b5361132 100644 (file)
@@ -2282,6 +2282,7 @@ static int relay_rotate_session_streams(
        }
 
        reply_code = LTTNG_OK;
+       ret = 0;
 end:
        if (stream) {
                stream_put(stream);
@@ -2295,8 +2296,6 @@ end:
                                send_ret);
                ret = -1;
        }
-
-       ret = 0;
 end_no_reply:
        lttng_trace_chunk_put(next_trace_chunk);
        return ret;
This page took 0.034978 seconds and 4 git commands to generate.