Fix: ctf: notif-iter: error on empty events (0 bits of data)
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 13 Jul 2017 16:18:29 +0000 (12:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Jul 2017 16:08:58 +0000 (12:08 -0400)
commit174e773b037534d485c72a5f558651f2857af243
tree5ae09f96b9ab802505f3245c595ac628821acd44
parent165711ff00cd1e76259fb1b00d1c07117e135394
Fix: ctf: notif-iter: error on empty events (0 bits of data)

Do not create an event which consumed 0 bits of data stream: log an
error and return without creating it. We keep the buffer position at the
beginning of the last decoded event header, and we compare to the
current buffer position: if they are the same, then we consumed 0 bits
of data. It is possible, when we compare, that notit->buf.last_eh_at is
-1ULL (reset when requesting bytes from medium): in this case, we know
we requested bytes anyway, which means we consumed something to get to
this starvation point, thus the event is not empty.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/common/notif-iter/notif-iter.c
This page took 0.025149 seconds and 4 git commands to generate.