X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fir%2Ftrace.c;h=4d27b833be4c0c0ca93330eb6e500ec5fc961194;hb=f67f3a6e48bc72149e6a9b370da39abddc2c57a6;hp=ca74d1703498086697c74e636037c5aa61990c27;hpb=44e0a4f5a816e471f1e74278704a6e52f94ab975;p=babeltrace.git diff --git a/formats/ctf/ir/trace.c b/formats/ctf/ir/trace.c index ca74d170..4d27b833 100644 --- a/formats/ctf/ir/trace.c +++ b/formats/ctf/ir/trace.c @@ -44,6 +44,8 @@ static void bt_ctf_trace_destroy(struct bt_ctf_ref *ref); static int init_trace_packet_header(struct bt_ctf_trace *trace); +static +void bt_ctf_trace_freeze(struct bt_ctf_trace *trace); static const unsigned int field_type_aliases_alignments[] = { @@ -435,10 +437,9 @@ int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace, if (ret) { goto end; } - bt_ctf_stream_class_freeze(stream_class); - trace->frozen = 1; - bt_ctf_attributes_freeze(trace->environment); + bt_ctf_stream_class_freeze(stream_class); + bt_ctf_trace_freeze(trace); end: if (ret) { (void) bt_ctf_stream_class_set_trace(stream_class, NULL); @@ -824,6 +825,13 @@ struct bt_ctf_field_type *get_field_type(enum field_type_alias alias) return field_type; } +static +void bt_ctf_trace_freeze(struct bt_ctf_trace *trace) +{ + bt_ctf_attributes_freeze(trace->environment); + trace->frozen = 1; +} + static int init_trace_packet_header(struct bt_ctf_trace *trace) {