gatt: Add implementation of AcquireWrite

System Internals / BlueZ - Luiz Augusto von Dentz [intel.com] - 5 July 2017 07:25 EDT

This implements AcquireWrite creating a pipe and passing the write fd to the application requesting it:

bluetoothd[29915]: src/gatt-client.c:characteristic_create_pipe() AcquireWrite: sender :1.378 io 0x89cdfe0

The fd is monitored and in case the client decides close it, or exit/crash, the daemon detects the HUP and cleanup properly:

bluetoothd[29915]: src/gatt-client.c:characteristic_pipe_hup() /org/bluez/hci1/dev_00_1B_DC_07_31_88/service001f/char0020: io 0x89cdfe0

c6d9a1b gatt: Add implementation of AcquireWrite
src/device.c | 8 ++-
src/gatt-client.c | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 168 insertions(+), 1 deletion(-)

Upstream: git.kernel.org


  • Share