Fix: bt_packet_context_field_create(): remove "frozen" SC precondition
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 01:26:25 +0000 (21:26 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 04:38:40 +0000 (00:38 -0400)
In bt_packet_context_field_create(), it is not a precondition that the
stream class be frozen. It used to mean that the stream class was
previously added to a trace class, but this is always the case now that
you pass the trace class to bt_stream_class_create().

bt_packet_context_field_create() freezes the stream class on success.
This shows that you can call bt_packet_context_field_create() with a
fresh, hot stream class, and then it becomes frozen.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I7487a516344d8b666e17d1c5e1a7dcefd1fd182e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1591
Tested-by: jenkins <jenkins@lttng.org>
src/lib/trace-ir/packet-context-field.c

index 1530ef97873028a585706139c82291fce08e3988..c03e1eae331de44e76404c0ff5dd6e7b75a52461 100644 (file)
@@ -63,9 +63,6 @@ struct bt_packet_context_field *bt_packet_context_field_create(
        struct bt_field_wrapper *field_wrapper;
 
        BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
-       BT_ASSERT_PRE(stream_class->frozen,
-               "Stream class is not part of a trace class: %!+S",
-               stream_class);
        BT_ASSERT_PRE(stream_class->packet_context_fc,
                "Stream class has no packet context field class: %!+S",
                stream_class);
This page took 0.026059 seconds and 4 git commands to generate.