X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fir%2Fstream-class.c;h=72b07b84c14cb26b98d983e908f4e88c18635dd3;hp=aba76cd17229dbc452c45312670ff0950705b0c8;hb=2607921689d4f7978382dfcac5bc7b4e766a42f1;hpb=d146339dfd3a1861da0959f40cd622373c966007 diff --git a/formats/ctf/ir/stream-class.c b/formats/ctf/ir/stream-class.c index aba76cd1..72b07b84 100644 --- a/formats/ctf/ir/stream-class.c +++ b/formats/ctf/ir/stream-class.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -340,6 +341,20 @@ int bt_ctf_stream_class_add_event_class( goto end; } + /* + * Resolve the event's sequence length and variant tags if the + * stream is already associated with a trace. Otherwise, this + * validation will be performed once the stream is registered + * to a trace. + */ + if (stream_class->trace) { + ret = bt_ctf_event_class_resolve_types(event_class, + stream_class->trace, stream_class); + if (ret) { + goto end; + } + } + /* Only set an event id if none was explicitly set before */ event_id = bt_ctf_event_class_get_id(event_class); if (event_id < 0) {