- component->initializing = BT_TRUE;
-
- if (component_class->methods.init) {
- BT_LOGD_STR("Calling user's initialization method.");
- ret = component_class->methods.init(
- bt_private_component_from_component(component), params,
- init_method_data);
- BT_LOGD("User method returned: status=%s",
- bt_component_status_string(ret));
- component->initializing = BT_FALSE;
- if (ret != BT_COMPONENT_STATUS_OK) {
- BT_LOGW_STR("Initialization method failed.");
- BT_PUT(component);
- goto end;
- }
- }
-
- component->initializing = BT_FALSE;
- ret = component_validation_funcs[type](component);
- if (ret != BT_COMPONENT_STATUS_OK) {
- BT_LOGW("Component is invalid: status=%s",
- bt_component_status_string(ret));
- BT_PUT(component);
- goto end;
- }
-
- BT_LOGD_STR("Freezing component class.");
- bt_component_class_freeze(component->class);
- BT_LOGD("Created component from component class: "
- "comp-cls-addr=%p, comp-cls-type=%s, name=\"%s\", "
- "params-addr=%p, init-method-data-addr=%p, comp-addr=%p",
- component_class, bt_component_class_type_string(type),
- name, params, init_method_data, component);
+ BT_LIB_LOGD("Created empty component from component class: "
+ "%![cc-]+C, %![comp-]+c", component_class, component);
+ BT_OBJECT_MOVE_REF(*user_component, component);