From: Jérémie Galarneau Date: Tue, 27 Aug 2019 20:37:26 +0000 (-0400) Subject: Use case-scope error labels handling LTTNG_CONSUMER_STREAMS_SENT X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=80d5a6586e9e76f862ea2b6842ad678f9268e616 Use case-scope error labels handling LTTNG_CONSUMER_STREAMS_SENT 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 --- 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: {