From: Jérémie Galarneau Date: Wed, 10 Dec 2014 20:32:29 +0000 (-0500) Subject: Fix: Only allow setting a packet context on a non-frozen stream class X-Git-Tag: v2.0.0-pre1~1454 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=0a00bfa1b606145e06c18898f465d9ab1e23faf6 Fix: Only allow setting a packet context on a non-frozen stream class Signed-off-by: Jérémie Galarneau --- diff --git a/formats/ctf/ir/stream-class.c b/formats/ctf/ir/stream-class.c index edbd43b6..6f1ec13e 100644 --- a/formats/ctf/ir/stream-class.c +++ b/formats/ctf/ir/stream-class.c @@ -286,7 +286,7 @@ int bt_ctf_stream_class_set_packet_context_type( { int ret = 0; - if (!stream_class || !packet_context_type) { + if (!stream_class || !packet_context_type || stream_class->frozen) { ret = -1; goto end; }