- goto end;
- }
-
- /*
- * Open a new write only file handle to populate the `metadata_buf`
- * memory buffer so we can write in loop in it easily.
- */
- fp = bt_open_memstream(&metadata_buf, &size);
- if (!fp) {
- if (errno == EINTR && lttng_live_graph_is_canceled(session->lttng_live_msg_iter)) {
- session->lttng_live_msg_iter->was_interrupted = true;
- status = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
- } else {
- BT_COMP_LOGE_APPEND_CAUSE_ERRNO(self_comp, "Metadata open_memstream", ".");
- status = LTTNG_LIVE_ITERATOR_STATUS_ERROR;
- }
- goto end;