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 18:18:41 +0000 (14:18 -0400)
commit9b876b7b77d4c652613570b502c14cf3aca6a31b
tree7021e2d15412c150c0e698b49480476f84807d6f
parent8825003aa1fb85c7cb2ae966dc6c582e5d11766d
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.026272 seconds and 4 git commands to generate.