- if (!component_class || component_class->frozen ||
- !notification_iterator_seek_time_method ||
- component_class->type != BT_COMPONENT_CLASS_TYPE_SOURCE) {
+ if (!component_class) {
+ BT_LOGW_STR("Invalid parameter: component class is NULL.");
+ ret = -1;
+ goto end;
+ }
+
+ if (!notification_iterator_seek_time_method) {
+ BT_LOGW_STR("Invalid parameter: method is NULL.");
+ ret = -1;
+ goto end;
+ }
+
+ if (component_class->type != BT_COMPONENT_CLASS_TYPE_SOURCE) {
+ BT_LOGW("Invalid parameter: component class is not a source component class: "
+ "addr=%p, name=\"%s\", type=%s",
+ component_class,
+ bt_component_class_get_name(component_class),
+ bt_component_class_type_string(component_class->type));
+ ret = -1;
+ goto end;
+ }
+
+ if (component_class->frozen) {
+ BT_LOGW("Invalid parameter: component class is frozen: "
+ "addr=%p, name=\"%s\", type=%s",
+ component_class,
+ bt_component_class_get_name(component_class),
+ bt_component_class_type_string(component_class->type));