- /* Consume one notification from each iterator. */
- for (i = 0; i < dummy->iterators->len; i++) {
- struct bt_notification_iterator *it;
- enum bt_notification_iterator_status it_ret;
-
- it = g_ptr_array_index(dummy->iterators, i);
-
- it_ret = bt_notification_iterator_next(it);
- switch (it_ret) {
- case BT_NOTIFICATION_ITERATOR_STATUS_ERROR:
- ret = BT_COMPONENT_STATUS_ERROR;
- goto end;
- case BT_NOTIFICATION_ITERATOR_STATUS_AGAIN:
- ret = BT_COMPONENT_STATUS_AGAIN;
- goto end;
- case BT_NOTIFICATION_ITERATOR_STATUS_END:
- g_ptr_array_remove_index(dummy->iterators, i);
- i--;
- continue;
- default:
- break;
+ /* Consume one message */
+ it_ret = bt_self_component_port_input_message_iterator_next(
+ dummy->msg_iter, &msgs, &count);
+ switch (it_ret) {
+ case BT_MESSAGE_ITERATOR_STATUS_OK:
+ ret = BT_SELF_COMPONENT_STATUS_OK;
+
+ for (i = 0; i < count; i++) {
+ bt_message_put_ref(msgs[i]);