X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fctf-ir%2Fevent.c;fp=lib%2Fctf-ir%2Fevent.c;h=6438564459c1d80308307d49fc9a0e5a6eeb0f80;hb=0c1fafedfae2efbae9a914ef676cb39879099921;hp=fd4563744e534157131df8d2a727a1dfe0fc2f2e;hpb=d461e009b19e525d003762586f3f7d30ed5f5f6f;p=babeltrace.git diff --git a/lib/ctf-ir/event.c b/lib/ctf-ir/event.c index fd456374..64385644 100644 --- a/lib/ctf-ir/event.c +++ b/lib/ctf-ir/event.c @@ -185,6 +185,19 @@ struct bt_event *bt_event_create(struct bt_event_class *event_class) goto error; } + /* + * Safe to automatically map selected fields to the stream's + * clock's class here because the stream class is about to be + * frozen. + */ + if (bt_stream_class_map_clock_class(stream_class, + validation_output.packet_context_type, + validation_output.event_header_type)) { + BT_LOGW_STR("Cannot automatically map selected stream class's " + "field types to stream class's clock's class."); + goto error; + } + /* * At this point we know the trace (if associated to the stream * class), the stream class, and the event class, with their