Use case-scope error labels handling LTTNG_CONSUMER_ROTATE_CHANNEL
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 27 Aug 2019 20:49:38 +0000 (16:49 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Aug 2019 22:33:19 +0000 (18:33 -0400)
This cleans-up the error handling of the case handling the
LTTNG_CONSUMER_ROTATE_CHANNEL 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 <jeremie.galarneau@efficios.com>
src/common/kernel-consumer/kernel-consumer.c

index 196da6633353a44ea6f73821494642e0cd7539a3..f9278f75d580d366122ee0e6b2a3216ca5c46895 100644 (file)
@@ -1145,7 +1145,7 @@ end_destroy_channel:
                ret = consumer_send_status_msg(sock, ret_code);
                if (ret < 0) {
                        /* Somehow, the session daemon is not responding anymore. */
                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. */
                }
                if (channel) {
                        /* Rotate the streams that are ready right now. */
@@ -1155,8 +1155,9 @@ end_destroy_channel:
                                ERR("Rotate ready streams failed");
                        }
                }
                                ERR("Rotate ready streams failed");
                        }
                }
-
                break;
                break;
+error_rotate_channel:
+               goto end_nosignal;
        }
        case LTTNG_CONSUMER_INIT:
        {
        }
        case LTTNG_CONSUMER_INIT:
        {
This page took 0.026222 seconds and 4 git commands to generate.