From 80d5a6586e9e76f862ea2b6842ad678f9268e616 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 27 Aug 2019 16:37:26 -0400 Subject: [PATCH] Use case-scope error labels handling LTTNG_CONSUMER_STREAMS_SENT MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This cleans-up the error handling of the case handling the LTTNG_CONSUMER_STREAMS_SENT command. This is done in order to allow a follow-up commit to perform some common clean-up operations on error while introducing as few changes as possible. No behaviour change is intended. Signed-off-by: Jérémie Galarneau --- src/common/kernel-consumer/kernel-consumer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index d6fdb036a..95c92ba9b 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -827,7 +827,7 @@ error_add_stream_fatal: ret = consumer_send_status_msg(sock, ret_code); if (ret < 0 || ret_code != LTTCOMM_CONSUMERD_SUCCESS) { /* Somehow, the session daemon is not responding anymore. */ - goto end_nosignal; + goto error_streams_sent_nosignal; } health_code_update(); @@ -837,7 +837,7 @@ error_add_stream_fatal: * streams in this channel. */ if (!channel->monitor) { - break; + goto end_error_streams_sent; } health_code_update(); @@ -846,11 +846,14 @@ error_add_stream_fatal: ret = consumer_send_relayd_streams_sent( msg.u.sent_streams.net_seq_idx); if (ret < 0) { - goto end_nosignal; + goto error_streams_sent_nosignal; } channel->streams_sent_to_relayd = true; } +end_error_streams_sent: break; +error_streams_sent_nosignal: + goto end_nosignal; } case LTTNG_CONSUMER_UPDATE_STREAM: { -- 2.34.1