Fix: lock stream class after assigning stream id
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Jan 2015 21:52:28 +0000 (16:52 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 28 Jan 2015 21:52:28 +0000 (16:52 -0500)
commit29d9d76c476cbf3fdf6fa709bfbdc24309974f06
treea4c4e7de3ddb62c84775a916c657e55a8a44646a
parentcbc14b73c12a08d94780d4e0221ba4cfd690b903
Fix: lock stream class after assigning stream id

Fixes a bug that was introduced by 2f100782 which made it possible
to set custom stream class IDs.

The stream class is frozen when a stream of its type is instanciated.
However, the trace or writer must still assign a unique ID to the stream
class if none were set prior. This modification moves the stream class
locking (freeze) after the ID assignment check.

Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/stream.c
formats/ctf/ir/trace.c
include/babeltrace/ctf-ir/stream-internal.h
This page took 0.024246 seconds and 4 git commands to generate.