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.3.1~1 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=66a12737a720a129c9b4e9b1d304b840b4738bff 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 b0a35c69..3ef4dae9 100644 --- a/formats/ctf/writer/writer.c +++ b/formats/ctf/writer/writer.c @@ -724,7 +724,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 */