From: Jérémie Galarneau Date: Wed, 11 Sep 2019 00:08:30 +0000 (-0400) Subject: Fix: communication error unreported in relay_rotate_session_streams X-Git-Tag: v2.11.0-rc4~60 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=80d04a21e92a21cca7e7a218dd985ac4339fbe6b;p=lttng-tools.git Fix: communication error unreported in relay_rotate_session_streams '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 --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 62a5bd7ce..0cd163fe8 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -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;