- ret = consumer_send_msg(socket, &msg);
- if (ret < 0) {
- goto error;
- }
-
- DBG3("UST consumer push metadata on sock %d of len %lu", socket->fd, len);
-
- ret = lttcomm_send_unix_sock(socket->fd, metadata_str, len);
- if (ret < 0) {
- fprintf(stderr, "send error: %d\n", ret);
- goto error;
- }
-
- health_code_update();
- ret = consumer_recv_status_reply(socket);
- if (ret < 0) {
- goto error;
- }
-
-error:
- health_code_update();
- /*
- * pthread_mutex_unlock(socket->lock);
- */
- return ret;
-}
-
-/*
- * Send a close metdata command to consumer using the given channel key.
- *
- * Return 0 on success else a negative value.
- */
-int ust_consumer_close_metadata(struct consumer_socket *socket,
- struct ust_app_channel *ua_chan)
-{
- int ret;
- struct lttcomm_consumer_msg msg;
-
- assert(ua_chan);
- assert(socket);
- assert(socket->fd >= 0);
-
- DBG2("UST consumer close metadata channel key %lu", ua_chan->key);
-
- msg.cmd_type = LTTNG_CONSUMER_CLOSE_METADATA;
- msg.u.close_metadata.key = ua_chan->key;