From ea7c86ef3045ef1d17666dca8563af52728daaf2 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 4 Jul 2017 16:02:27 -0400 Subject: [PATCH] sink.ctf.fs: use original stream's name as CTF writer stream's name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- plugins/ctf/fs-sink/write.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/ctf/fs-sink/write.c b/plugins/ctf/fs-sink/write.c index b3ad7462..a0c9d7d9 100644 --- a/plugins/ctf/fs-sink/write.c +++ b/plugins/ctf/fs-sink/write.c @@ -148,6 +148,14 @@ struct bt_ctf_stream_class *insert_new_stream_class( goto error; } + ret = bt_ctf_trace_add_stream_class(writer_trace, writer_stream_class); + if (ret) { + fprintf(writer_component->err, + "[error] %s in %s:%d\n", __func__, __FILE__, + __LINE__); + goto error; + } + g_hash_table_insert(fs_writer->stream_class_map, (gpointer) stream_class, writer_stream_class); @@ -513,8 +521,8 @@ struct bt_ctf_stream *insert_new_stream( } bt_get(writer_stream_class); - writer_stream = bt_ctf_writer_create_stream(ctf_writer, - writer_stream_class); + writer_stream = bt_ctf_stream_create(writer_stream_class, + bt_ctf_stream_get_name(stream)); if (!writer_stream) { fprintf(writer_component->err, "[error] %s in %s:%d\n", __func__, __FILE__, __LINE__); -- 2.34.1