From: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> In compatibility mode, the babeltrace compat layer around memstream copies the file content into the buffer only at close.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> --- formats/lttng-live/lttng-live-comm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index 91e344c..6422e65 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -932,8 +932,9 @@ int get_new_metadata(struct lttng_live_ctx *ctx, } } while (ret > 0 || !len_read); - if (fclose(metadata_stream->metadata_fp_write)) - perror("fclose"); + if (babeltrace_close_memstream(metadata_buf, &size, + metadata_stream->metadata_fp_write)) + perror("babeltrace_close_memstream"); metadata_stream->metadata_fp_write = NULL; error: -- 1.9.1 _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev