+ if (!stream_class) {
+ BT_LOGW_STR("Invalid parameter: stream class is NULL.");
+ ret = -1;
+ goto end;
+ }
+
+ if (stream_class->frozen) {
+ BT_LOGW("Invalid parameter: stream class is frozen: "
+ "addr=%p, name=\"%s\", id=%" PRId64,
+ stream_class, bt_ctf_stream_class_get_name(stream_class),
+ bt_ctf_stream_class_get_id(stream_class));
+ ret = -1;
+ goto end;
+ }
+
+ if (id < 0) {
+ BT_LOGW("Invalid parameter: invalid stream class's ID: "
+ "stream-class-addr=%p, stream-class-name=\"%s\", "
+ "stream-class-id=%" PRId64 ", id=%" PRIu64,
+ stream_class, bt_ctf_stream_class_get_name(stream_class),
+ bt_ctf_stream_class_get_id(stream_class),
+ id_param);