Fix: Confusion between stream and stream class IDs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Nov 2015 18:19:06 +0000 (13:19 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Nov 2015 18:19:06 +0000 (13:19 -0500)
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 <rsdunlapiv@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/writer/writer.c

index b0a35c6963d04245c1f4862f7ae74be3eb5069d6..3ef4dae94d373be3b8396731f1a9c7c52d6858d8 100644 (file)
@@ -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 */
This page took 0.024821 seconds and 4 git commands to generate.