gatt-database: No multiple calls to AcquireWrite
authorSebastian Urban <surban@surban.net>
Sat, 12 Jun 2021 09:56:01 +0000 (11:56 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commitbaefc1803bcd883f7b1e6e98ffb05da72fa7337c
tree1fc42c4157e6996369c23c142a8dff0ebe75128a
parentfff590e4b43d04a5604c7122bd3094b604645466
gatt-database: No multiple calls to AcquireWrite

This checks if an outstanding call to AcquireWrite is already in
progress. If so, the write request is placed into the queue, but
AcquireWrite is not called again. When a response to AcquireWrite is
received, acquire_write_reply sends all queued writes over the acquired
socket.

Making multiple simultaneous calls to AcquireWrite makes no sense,
as this would open multiple socket pairs and only the last returned
socket would be used for further writes.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/gatt-database.c