status == BT_MESSAGE_ITERATOR_STATUS_NOMEM ||
status == BT_MESSAGE_ITERATOR_STATUS_AGAIN,
"Unexpected status: %![iter-]+i, status=%s",
- iterator, bt_self_message_iterator_status_string(status));
+ iterator, bt_common_self_message_iterator_status_string(status));
set_iterator_state_after_seeking(iterator, status);
return status;
}
skip_msg:
bt_object_put_no_null_check(msg);
+ msg = NULL;
goto end;
push_msg:
BT_ASSERT(iterator->methods.next);
- while (true) {
+ while (!got_first) {
/*
* Call the user's "next" method to get the next
* messages and status.
status = auto_seek_handle_message(iterator,
ns_from_origin, messages[i], &got_first);
if (status == BT_MESSAGE_ITERATOR_STATUS_OK) {
- /* Message was either put or moved */
+ /* Message was either pushed or moved */
messages[i] = NULL;
} else {
goto end;
status == BT_MESSAGE_ITERATOR_STATUS_AGAIN,
"Unexpected status: %![iter-]+i, status=%s",
iterator,
- bt_self_message_iterator_status_string(status));
+ bt_common_self_message_iterator_status_string(status));
} else {
/* Start automatic seeking: seek beginning first */
BT_ASSERT(iterator->methods.can_seek_beginning(iterator));
status == BT_MESSAGE_ITERATOR_STATUS_AGAIN,
"Unexpected status: %![iter-]+i, status=%s",
iterator,
- bt_self_message_iterator_status_string(status));
+ bt_common_self_message_iterator_status_string(status));
switch (status) {
case BT_MESSAGE_ITERATOR_STATUS_OK:
break;