- assert(muxer_notif_iter);
- priv_comp = bt_private_notification_iterator_get_private_component(
- priv_notif_iter);
- assert(priv_comp);
- muxer_comp = bt_private_component_get_user_data(priv_comp);
- assert(muxer_comp);
-
- BT_LOGV("Muxer component's notification iterator's \"next\" method called: "
- "comp-addr=%p, muxer-comp-addr=%p, muxer-notif-iter-addr=%p, "
- "notif-iter-addr=%p",
- priv_comp, muxer_comp, muxer_notif_iter, priv_notif_iter);
-
- /* Are we in an error state set elsewhere? */
- if (unlikely(muxer_comp->error)) {
- BT_LOGE("Muxer component is already in an error state: returning BT_NOTIFICATION_ITERATOR_STATUS_ERROR: "
- "comp-addr=%p, muxer-comp-addr=%p, muxer-notif-iter-addr=%p, "
- "notif-iter-addr=%p",
- priv_comp, muxer_comp, muxer_notif_iter, priv_notif_iter);
- next_ret.notification = NULL;
- next_ret.status = BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
- goto end;
- }
-
- next_ret = muxer_notif_iter_do_next(muxer_comp, muxer_notif_iter);
- if (next_ret.status < 0) {
- BT_LOGE("Cannot get next notification: "
- "comp-addr=%p, muxer-comp-addr=%p, muxer-notif-iter-addr=%p, "
- "notif-iter-addr=%p, status=%s",
- priv_comp, muxer_comp, muxer_notif_iter, priv_notif_iter,
- bt_notification_iterator_status_string(next_ret.status));
+ BT_ASSERT(muxer_msg_iter);
+ self_comp = bt_self_message_iterator_borrow_component(
+ self_msg_iter);
+ BT_ASSERT(self_comp);
+ muxer_comp = bt_self_component_get_data(self_comp);
+ BT_ASSERT(muxer_comp);
+ BT_LOGV("Muxer component's message iterator's \"next\" method called: "
+ "comp-addr=%p, muxer-comp-addr=%p, muxer-msg-iter-addr=%p, "
+ "msg-iter-addr=%p",
+ self_comp, muxer_comp, muxer_msg_iter, self_msg_iter);
+
+ status = muxer_msg_iter_do_next(muxer_comp, muxer_msg_iter,
+ msgs, capacity, count);
+ if (status < 0) {
+ BT_LOGE("Cannot get next message: "
+ "comp-addr=%p, muxer-comp-addr=%p, muxer-msg-iter-addr=%p, "
+ "msg-iter-addr=%p, status=%s",
+ self_comp, muxer_comp, muxer_msg_iter, self_msg_iter,
+ bt_common_self_message_iterator_status_string(status));