A payload view's fd iterator must point to the root view's fd iterator
and not necessarily its parent's. This would cause the iterator
to be reset when views were nested more than two levels deep.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I37eab2ca1437b1a8446449984619106ffff90d3a
{
return (struct lttng_payload_view) {
.buffer = lttng_buffer_view_from_view(
- &view->buffer, offset, len),
+ &view->buffer, offset, len),
._fds = view->_fds,
- ._iterator.p_fds_position = &view->_iterator.fds_position,
+ ._iterator.p_fds_position = view->_iterator.p_fds_position ?:
+ &view->_iterator.fds_position,
};
}