+ return status;
+}
+
+BT_HIDDEN
+enum bt_notification_iterator_status ctf_fs_iterator_next(
+ struct bt_private_connection_private_notification_iterator *iterator,
+ bt_notification_array notifs, uint64_t capacity,
+ uint64_t *count)
+{
+ enum bt_notification_iterator_status status =
+ BT_NOTIFICATION_ITERATOR_STATUS_OK;
+ struct ctf_fs_notif_iter_data *notif_iter_data =
+ bt_private_connection_private_notification_iterator_get_user_data(iterator);
+ uint64_t i = 0;
+
+ while (i < capacity && status == BT_NOTIFICATION_ITERATOR_STATUS_OK) {
+ status = ctf_fs_iterator_next_one(notif_iter_data, ¬ifs[i]);
+ if (status == BT_NOTIFICATION_ITERATOR_STATUS_OK) {
+ i++;
+ }
+ }
+
+ if (i > 0) {
+ /*
+ * Even if ctf_fs_iterator_next_one() returned something
+ * else than BT_NOTIFICATION_ITERATOR_STATUS_OK, we
+ * accumulated notification objects in the output
+ * notification array, so we need to return
+ * BT_NOTIFICATION_ITERATOR_STATUS_OK so that they are
+ * transfered to downstream. This other status occurs
+ * again the next time muxer_notif_iter_do_next() is
+ * called, possibly without any accumulated
+ * notification, in which case we'll return it.
+ */
+ *count = i;
+ status = BT_NOTIFICATION_ITERATOR_STATUS_OK;
+ }
+
+ return status;