This cleans-up the error handling of the case handling the
LTTNG_CONSUMER_PUSH_METADATA 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>
*/
DBG("UST consumer push metadata %" PRIu64 " not found", key);
ret_code = LTTCOMM_CONSUMERD_CHANNEL_FAIL;
*/
DBG("UST consumer push metadata %" PRIu64 " not found", key);
ret_code = LTTCOMM_CONSUMERD_CHANNEL_FAIL;
+ goto end_push_metadata_msg_sessiond;
* checked whether the channel can be found.
*/
ret_code = LTTCOMM_CONSUMERD_SUCCESS;
* checked whether the channel can be found.
*/
ret_code = LTTCOMM_CONSUMERD_SUCCESS;
+ goto end_push_metadata_msg_sessiond;
}
/* Tell session daemon we are ready to receive the metadata. */
ret = consumer_send_status_msg(sock, LTTCOMM_CONSUMERD_SUCCESS);
if (ret < 0) {
/* Somehow, the session daemon is not responding anymore. */
}
/* Tell session daemon we are ready to receive the metadata. */
ret = consumer_send_status_msg(sock, LTTCOMM_CONSUMERD_SUCCESS);
if (ret < 0) {
/* Somehow, the session daemon is not responding anymore. */
+ goto error_push_metadata_fatal;
ret = lttng_consumer_poll_socket(consumer_sockpoll);
health_poll_exit();
if (ret) {
ret = lttng_consumer_poll_socket(consumer_sockpoll);
health_poll_exit();
if (ret) {
+ goto error_push_metadata_fatal;
len, version, channel, 0, 1);
if (ret < 0) {
/* error receiving from sessiond */
len, version, channel, 0, 1);
if (ret < 0) {
/* error receiving from sessiond */
+ goto error_push_metadata_fatal;
+ goto end_push_metadata_msg_sessiond;
+end_push_metadata_msg_sessiond:
+ goto end_msg_sessiond;
+error_push_metadata_fatal:
+ goto error_fatal;
}
case LTTNG_CONSUMER_SETUP_METADATA:
{
}
case LTTNG_CONSUMER_SETUP_METADATA:
{