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.12.0-rc1~407 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=eaeb64a96cf1ecf2a1b6e654a74bb38892bbfd9e 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;