writer_packet);
assert(new_notification);
bt_put(packet);
- bt_put(writer_packet);
break;
}
case BT_NOTIFICATION_TYPE_EVENT:
return ret;
}
-/*
-static
-struct bt_notification *debug_info_iterator_get(
- struct bt_private_notification_iterator *iterator)
-{
- struct debug_info_iterator *debug_it;
-
- debug_it = bt_private_notification_iterator_get_user_data(iterator);
- assert(debug_it);
-
- if (!debug_it->current_notification) {
- enum bt_notification_iterator_status it_ret;
-
- it_ret = debug_info_iterator_next(iterator);
- if (it_ret) {
- goto end;
- }
- }
-
-end:
- return bt_get(debug_it->current_notification);
-}
-*/
-
static
enum bt_notification_iterator_status debug_info_iterator_init(
struct bt_private_notification_iterator *iterator,
{
enum bt_component_status ret;
struct debug_info_component *debug_info = create_debug_info_component_data();
- struct bt_private_port *priv_port = NULL;
if (!debug_info) {
ret = BT_COMPONENT_STATUS_NOMEM;
goto error;
}
- priv_port = bt_private_component_filter_add_input_private_port(
- component, "in", NULL);
- if (!priv_port) {
- ret = BT_COMPONENT_STATUS_ERROR;
+ ret = bt_private_component_filter_add_input_private_port(
+ component, "in", NULL, NULL);
+ if (ret != BT_COMPONENT_STATUS_OK) {
goto end;
}
- BT_PUT(priv_port);
- priv_port = bt_private_component_filter_add_output_private_port(
- component, "out", NULL);
- if (!priv_port) {
- ret = BT_COMPONENT_STATUS_ERROR;
+ ret = bt_private_component_filter_add_output_private_port(
+ component, "out", NULL, NULL);
+ if (ret != BT_COMPONENT_STATUS_OK) {
goto end;
}
- BT_PUT(priv_port);
ret = init_from_params(debug_info, params);
end: