X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fkernel-consumer%2Fkernel-consumer.c;h=f9278f75d580d366122ee0e6b2a3216ca5c46895;hb=070b6a86970c981e8f79cbd3dc199008b25cc0dc;hp=d6fdb036a5e9b50ac97ba5fbd17c735776e252d1;hpb=c5c7998fccd830f54ebec3fa1d9af7ffe5bfbeb4;p=lttng-tools.git diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index d6fdb036a..f9278f75d 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: { @@ -976,14 +979,14 @@ error_add_stream_fatal: ret = consumer_send_status_msg(sock, ret_code); if (ret < 0) { /* Somehow, the session daemon is not responding anymore. */ - goto end_nosignal; + goto end_destroy_channel; } health_code_update(); /* Stop right now if no channel was found. */ if (!channel) { - goto end_nosignal; + goto end_destroy_channel; } /* @@ -999,7 +1002,7 @@ error_add_stream_fatal: assert(!uatomic_sub_return(&channel->refcount, 1)); consumer_del_channel(channel); - +end_destroy_channel: goto end_nosignal; } case LTTNG_CONSUMER_DISCARDED_EVENTS: @@ -1142,7 +1145,7 @@ error_add_stream_fatal: ret = consumer_send_status_msg(sock, ret_code); if (ret < 0) { /* Somehow, the session daemon is not responding anymore. */ - goto end_nosignal; + goto error_rotate_channel; } if (channel) { /* Rotate the streams that are ready right now. */ @@ -1152,8 +1155,9 @@ error_add_stream_fatal: ERR("Rotate ready streams failed"); } } - break; +error_rotate_channel: + goto end_nosignal; } case LTTNG_CONSUMER_INIT: {