ctf: notif-iter.c: check state on BT_CTF_NOTIF_ITER_MEDIUM_STATUS_EOF
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 12 Jul 2017 00:12:37 +0000 (20:12 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Jul 2017 21:01:51 +0000 (17:01 -0400)
commit0684124bf979ac663c63ed68f9969cf5eacf2cd6
treeca49cbc6cdc0d9e547c3621cba94712622d5fbb6
parentc60cf0817b71841d2c3194d522ac613c0463cc6f
ctf: notif-iter.c: check state on BT_CTF_NOTIF_ITER_MEDIUM_STATUS_EOF

When the notif iter's request_bytes() medium operation returns
BT_CTF_NOTIF_ITER_MEDIUM_STATUS_EOF, make sure that the notif iter
instance is in an expected state. Which states are valid depend on the
metadata (is there a packet size or not, etc.). Return an error from
request_medium_bytes() when the state is incorrect.

This solves streams which should fail but pass, for example when the
data ends within the middle of a packet header field, a packet context
field, or an event.

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.025021 seconds and 4 git commands to generate.