shared/att: Handle disconnects

System Internals / BlueZ - Arman Uguray [chromium.org] - 15 August 2014 02:52 UTC

This patch adds disconnect handling to bt_att, in which io_set_disconnect_handler is used to set up a handler which cancels all pending and queued ATT operations, marks the bt_att structure as invalid and notifies the user via a specialized callback which can be set using bt_att_set_disconnect_cb.

Once the bt_att structure is invalidated, either due to a timed-out ATT protocol request/indication or a disconnect, it now destroys the underlying io structure.

0fead97 shared/att: Handle disconnects.
src/shared/att.c | 77 +++++++++++++++++++++++++++++++++++++++++++-----------
src/shared/att.h | 5 ++++
2 files changed, 67 insertions(+), 15 deletions(-)

Upstream: git.kernel.org


  • Share