From: Mathieu Desnoyers Date: Thu, 23 Jun 2011 20:27:10 +0000 (-0400) Subject: Move stream_id to struct ctf_stream X-Git-Tag: v0.1~9^2~10 X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=661c4ce8ecca0a2a33c257cf26e47961728fe1c7;p=babeltrace.git Move stream_id to struct ctf_stream Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index b02ef2a2..80f726ac 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -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; diff --git a/include/babeltrace/ctf-ir/metadata.h b/include/babeltrace/ctf-ir/metadata.h index 257f4f33..bf83aee5 100644 --- a/include/babeltrace/ctf-ir/metadata.h +++ b/include/babeltrace/ctf-ir/metadata.h @@ -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 */ };