Use case-scope error labels handling LTTNG_CONSUMER_ROTATE_CHANNEL
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index 95c92ba9b961d99821a80d21c339dc466af2924d..f9278f75d580d366122ee0e6b2a3216ca5c46895 100644 (file)
@@ -979,14 +979,14 @@ error_streams_sent_nosignal:
                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;
                }
 
                /*
@@ -1002,7 +1002,7 @@ error_streams_sent_nosignal:
                assert(!uatomic_sub_return(&channel->refcount, 1));
 
                consumer_del_channel(channel);
-
+end_destroy_channel:
                goto end_nosignal;
        }
        case LTTNG_CONSUMER_DISCARDED_EVENTS:
@@ -1145,7 +1145,7 @@ error_streams_sent_nosignal:
                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. */
@@ -1155,8 +1155,9 @@ error_streams_sent_nosignal:
                                ERR("Rotate ready streams failed");
                        }
                }
-
                break;
+error_rotate_channel:
+               goto end_nosignal;
        }
        case LTTNG_CONSUMER_INIT:
        {
This page took 0.023228 seconds and 4 git commands to generate.