From: Jérémie Galarneau Date: Tue, 23 Jun 2020 04:23:01 +0000 (-0400) Subject: Fix: payload view: payload view always refers to parent's position X-Git-Tag: v2.13.0-rc1~567 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ddab38d1659326ae7933319adefc3dff243da352;p=lttng-tools.git Fix: payload view: payload view always refers to parent's position 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 Change-Id: I37eab2ca1437b1a8446449984619106ffff90d3a --- diff --git a/src/common/payload-view.c b/src/common/payload-view.c index f15fa8447..2daa7d3ee 100644 --- a/src/common/payload-view.c +++ b/src/common/payload-view.c @@ -30,9 +30,10 @@ struct lttng_payload_view lttng_payload_view_from_view( { 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, }; }