Fix: src.ctf.fs: increment packet offset before init of index entry
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 10 Jun 2019 16:30:10 +0000 (12:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:22 +0000 (17:24 -0400)
commit9502dc00cd94934292a9b26039994c893124b23e
tree8bada6d59fb458ba5c1d24fadd3dc65acbda8053
parentbf43665775513c187cce8a1fea97eeaf36bc6c35
Fix: src.ctf.fs: increment packet offset before init of index entry

Issue
=====
The `current_packet_offset_bytes` variable is incremented before the
initialization of the current `index_entry` by `init_index_entry()`.
This lead to each entry having the offset of the next entry and the last
entry having a erroneous offset.

Solution
========
Increment the `current_packet_offset_bytes` variable after the
initialization of each entry.

Drawbacks
=========
None.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I7592b2d70f402aa413de97a687bfe4fe1bf1b825
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1409
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
plugins/ctf/fs-src/data-stream-file.c
This page took 0.024358 seconds and 4 git commands to generate.