- goto error;
- }
-
- /*
- * If we have upstream notification iterators to retry, retry
- * them now. Each one we find which now has a notification or
- * is in "end" state, we set it to NULL in this array. Then
- * we remove all the NULL values from this array.
- */
- retry_node = muxer_notif_iter->muxer_upstream_notif_iters_to_retry;
- while (retry_node) {
- struct muxer_upstream_notif_iter *muxer_upstream_notif_iter =
- retry_node->data;
- enum bt_notification_iterator_status status;
- GList *next_retry_node = g_list_next(retry_node);
-
- assert(muxer_upstream_notif_iter->notif_iter);
- status = bt_notification_iterator_next(
- muxer_upstream_notif_iter->notif_iter);
- if (status < 0) {
- goto error;
- }
-
- if (status == BT_NOTIFICATION_ITERATOR_STATUS_END) {
- /*
- * This upstream notification iterator is done.
- * Put the iterator and remove node from list.
- */
- BT_PUT(muxer_upstream_notif_iter->notif_iter);
- muxer_notif_iter->muxer_upstream_notif_iters_to_retry =
- g_list_delete_link(
- muxer_notif_iter->muxer_upstream_notif_iters_to_retry,
- retry_node);
- retry_node = next_retry_node;
- continue;
- }
-
- assert(status == BT_NOTIFICATION_ITERATOR_STATUS_OK ||
- status == BT_NOTIFICATION_ITERATOR_STATUS_AGAIN);
-
- if (status == BT_NOTIFICATION_ITERATOR_STATUS_OK) {
- /*
- * This upstream notification iterator now has.
- * a notification. Remove it from this list.
- */
- muxer_notif_iter->muxer_upstream_notif_iters_to_retry =
- g_list_delete_link(
- muxer_notif_iter->muxer_upstream_notif_iters_to_retry,
- retry_node);
- }
-
- retry_node = next_retry_node;
- }
-
- /* Take our next "next" next return value */
- next_ret = muxer_notif_iter->next_next_return;
- muxer_notif_iter->next_next_return.status =
- BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
- muxer_notif_iter->next_next_return.notification = NULL;
-
- /* Set the next "next" return value */
- ret = muxer_notif_iter_set_next_next_return(muxer_comp,
- muxer_notif_iter);
- if (ret) {
- goto error;