ir: only perform trace freeze if not already frozen
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 May 2015 21:34:06 +0000 (17:34 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 May 2015 21:39:24 +0000 (17:39 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/trace.c

index a2046b9d04eb889d5a9ac7f0479ee12f847b28cb..3fa90aa94782af0cb8a87e980df4f7629a946218 100644 (file)
@@ -497,7 +497,9 @@ int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace,
        }
 
        bt_ctf_stream_class_freeze(stream_class);
        }
 
        bt_ctf_stream_class_freeze(stream_class);
-       bt_ctf_trace_freeze(trace);
+       if (!trace->frozen) {
+               bt_ctf_trace_freeze(trace);
+       }
 end:
        if (ret) {
                (void) bt_ctf_stream_class_set_trace(stream_class, NULL);
 end:
        if (ret) {
                (void) bt_ctf_stream_class_set_trace(stream_class, NULL);
This page took 0.028341 seconds and 4 git commands to generate.