#include <babeltrace/graph/notification-iterator.h>
#include <babeltrace/graph/private-notification-iterator.h>
+#include <babeltrace/graph/connection.h>
#include <babeltrace/graph/notification.h>
#include <babeltrace/graph/notification-event.h>
#include <babeltrace/graph/notification-stream.h>
enum bt_notification_iterator_status ret =
BT_NOTIFICATION_ITERATOR_STATUS_OK;
enum bt_notification_iterator_status it_ret;
+ enum bt_connection_status conn_status;
struct bt_private_connection *connection = NULL;
struct bt_private_component *component =
bt_private_notification_iterator_get_private_component(iterator);
goto end;
}
- it_data->input_iterator = bt_private_connection_create_notification_iterator(
- connection, notif_types);
- if (!it_data->input_iterator) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_NOMEM;
+ conn_status = bt_private_connection_create_notification_iterator(
+ connection, notif_types, &it_data->input_iterator);
+ if (conn_status != BT_CONNECTION_STATUS_OK) {
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
goto end;
}
{
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: