Fix: cancel a notif. iter. finalized during its "next" method
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 5 Jun 2017 19:18:11 +0000 (15:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 21:02:58 +0000 (17:02 -0400)
commit8cf27cc5e3f9c0ee7e1120ba0e0bd7f17d5a10ed
tree9f918f609e12ffec2e1b928c334082ebd93841f8
parent8f9d7550c162149e4cc7baf4456aa767d0020423
Fix: cancel a notif. iter. finalized during its "next" method

It is possible that the user's "next" method, somehow, cancels its own
notification iterator. This can happen, for example, when the user's
method removes the port on which there's the connection from which the
notification iterator was created. In this case, said connection is
ended, and all its notification iterators are finalized.

In ensure_queue_has_notifications(), after calling the user's "next"
method, if there's no error, we check if the notification iterator is
finalized. If so, we return the BT_NOTIFICATION_ITERATOR_STATUS_CANCELED
status directly.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/graph/iterator.c
This page took 0.025827 seconds and 4 git commands to generate.