From: Philippe Proulx Date: Tue, 4 Jul 2017 20:02:27 +0000 (-0400) Subject: sink.ctf.fs: use original stream's name as CTF writer stream's name X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=e48a596a3dc2bba3867232be4bb626f9011920b8 sink.ctf.fs: use original stream's name as CTF writer stream's name Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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__);