Move stream_id to struct ctf_stream
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jun 2011 20:27:10 +0000 (16:27 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jun 2011 20:27:10 +0000 (16:27 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
include/babeltrace/ctf-ir/metadata.h

index b02ef2a23b62949c91f0629e36dce2dc2e0cc7cb..80f726aca7701cb699e2a221389dce2af759adde 100644 (file)
@@ -881,12 +881,12 @@ int create_stream_packet_index(struct ctf_trace *td,
                        }
                }
 
-               if (!first_packet && file_stream->stream_id != stream_id) {
+               if (!first_packet && file_stream->stream.stream_id != stream_id) {
                        fprintf(stdout, "[error] Stream ID is changing within a stream.\n");
                        return -EINVAL;
                }
                if (first_packet) {
-                       file_stream->stream_id = stream_id;
+                       file_stream->stream.stream_id = stream_id;
                        if (stream_id >= td->streams->len) {
                                fprintf(stdout, "[error] Stream %" PRIu64 " is not declared in metadata.\n", stream_id);
                                return -EINVAL;
index 257f4f3352527202cf6532161ab4da2243245246..bf83aee51f826e6dea28579b2e8a9da16566e232 100644 (file)
@@ -36,6 +36,7 @@ struct ctf_event;
 struct ctf_stream {
        struct ctf_stream_class *stream_class;
        uint64_t timestamp;                     /* Current timestamp, in ns */
+       uint64_t stream_id;
 
        struct definition_struct *trace_packet_header;
        struct definition_struct *stream_packet_context;
@@ -52,7 +53,6 @@ struct ctf_stream_event {
 };
 
 struct ctf_file_stream {
-       uint64_t stream_id;
        struct ctf_stream stream;
        struct ctf_stream_pos pos;      /* current stream position */
 };
This page took 0.026276 seconds and 4 git commands to generate.