From: Jérémie Galarneau Date: Tue, 10 Nov 2015 18:19:06 +0000 (-0500) Subject: Fix: Confusion between stream and stream class IDs X-Git-Tag: v1.2.5~1 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=c9b084fbc28f2cdbd5db3440fa9397ea5debb15e Fix: Confusion between stream and stream class IDs CTF Writer is using the stream id, which is really a "file id", to populate the packet header. The packet header's id should match a stream class declaration in the TSDL metadata file. Reported-by: Rocky Dunlap Signed-off-by: Jérémie Galarneau --- diff --git a/formats/ctf/writer/writer.c b/formats/ctf/writer/writer.c index 3630b36b..9cdf46af 100644 --- a/formats/ctf/writer/writer.c +++ b/formats/ctf/writer/writer.c @@ -723,7 +723,8 @@ void stream_flush_cb(struct bt_ctf_stream *stream, struct bt_ctf_writer *writer) stream_id = bt_ctf_field_structure_get_field( writer->trace_packet_header, "stream_id"); - bt_ctf_field_unsigned_integer_set_value(stream_id, stream->id); + bt_ctf_field_unsigned_integer_set_value(stream_id, + stream->stream_class->id); bt_ctf_field_put(stream_id); /* Write the trace_packet_header */