Add the concept of a static trace
[babeltrace.git] / lib / ctf-ir / stream-class.c
index 4fac746800a0646508cc3d14af2044d2c71be3a4..0463a119e591f620f0fae02be0b9c7bde294f6c8 100644 (file)
@@ -336,6 +336,12 @@ int bt_ctf_stream_class_add_event_class(
                goto end;
        }
 
+       trace = bt_ctf_stream_class_get_trace(stream_class);
+       if (trace && trace->is_static) {
+               ret = -1;
+               goto end;
+       }
+
        event_id = g_new(int64_t, 1);
        if (!event_id) {
                ret = -1;
@@ -358,7 +364,6 @@ int bt_ctf_stream_class_add_event_class(
                goto end;
        }
 
-       trace = bt_ctf_stream_class_get_trace(stream_class);
        if (trace) {
                /*
                 * If the stream class is associated with a trace, then
This page took 0.024558 seconds and 4 git commands to generate.