msg);
break;
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
- clock_snapshot = bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+ clock_snapshot = bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
msg);
break;
default:
"Error getting the next message from CTF message iterator");
live_status = LTTNG_LIVE_ITERATOR_STATUS_ERROR;
goto end;
+ } else if (status == CTF_MSG_ITER_STATUS_EOF) {
+ BT_COMP_LOGI("Reached the end of the live stream iterator.");
+ live_status = LTTNG_LIVE_ITERATOR_STATUS_END;
+ goto end;
}
BT_ASSERT(status == CTF_MSG_ITER_STATUS_OK);
/*
* Check if the message of the current live stream
- * iterator occured at the exact same time or after the
+ * iterator occurred at the exact same time or after the
* last message returned by this component's message
* iterator. If not, we return an error.
*/
bt_message_iterator_class_initialize_method_status lttng_live_msg_iter_init(
bt_self_message_iterator *self_msg_it,
bt_self_message_iterator_configuration *config,
- bt_self_component *self_comp,
bt_self_component_port_output *self_port)
{
bt_message_iterator_class_initialize_method_status status;
struct lttng_live_msg_iter *lttng_live_msg_iter;
enum lttng_live_viewer_status viewer_status;
bt_logging_level log_level;
-
- BT_ASSERT(self_msg_it);
+ bt_self_component *self_comp =
+ bt_self_message_iterator_borrow_component(self_msg_it);
lttng_live = bt_self_component_get_data(self_comp);
log_level = lttng_live->log_level;