- dummy = bt_private_component_get_user_data(component);
- assert(dummy);
-
- /* 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_END:
- ret = BT_COMPONENT_STATUS_END;
- g_ptr_array_remove_index(dummy->iterators, i);
- i--;
- continue;
- default:
- break;
- }
+ dummy = bt_self_component_get_data(
+ bt_self_component_sink_as_self_component(component));
+ BT_ASSERT(dummy);
+
+ if (unlikely(!dummy->notif_iter)) {
+ ret = BT_SELF_COMPONENT_STATUS_END;
+ goto end;
+ }