-
- status = ctf_fs_ds_file_next(msg_iter_data->ds_file, &priv_msg);
- *msg = priv_msg;
-
- /*
- * If we get a message, we expect to get a
- * BT_MESSAGE_TYPE_STREAM_BEGINNING message
- * because the iterator's state machine emits one before
- * even requesting the first block of data from the
- * medium. Skip this message because we're not
- * really starting a new stream here, and try getting a
- * new message (which, if it works, is a
- * BT_MESSAGE_TYPE_PACKET_BEGINNING one). We're sure to
- * get at least one pair of
- * BT_MESSAGE_TYPE_PACKET_BEGINNING and
- * BT_MESSAGE_TYPE_PACKET_END messages in the
- * case of a single, empty packet. We know there's at
- * least one packet because the stream file group does
- * not contain empty stream files.
- */
- BT_ASSERT(msg_iter_data->skip_stream_begin_msgs);
-
- if (status == BT_SELF_MESSAGE_ITERATOR_STATUS_OK) {
- BT_ASSERT(bt_message_get_type(*msg) ==
- BT_MESSAGE_TYPE_STREAM_BEGINNING);
- BT_MESSAGE_PUT_REF_AND_RESET(*msg);
- status = ctf_fs_ds_file_next(msg_iter_data->ds_file,
- &priv_msg);
- *msg = priv_msg;
- BT_ASSERT(status != BT_SELF_MESSAGE_ITERATOR_STATUS_END);