gatt: Add org.bluez.Error.InvalidOffset for long read procedure 44/204944/1
authorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Tue, 20 Mar 2018 14:05:17 +0000 (15:05 +0100)
committerAmit Purwar <amit.purwar@samsung.com>
Fri, 26 Apr 2019 10:52:06 +0000 (16:22 +0530)
commita06fc2e6cd0f955ea0b8bf9c3ac1fdcfef8a0e25
tree89168b71c7a08674f50d87175feeb979a10a9e79
parentbde2c4d9959cc48309b4796890c198d434186bc1
gatt: Add org.bluez.Error.InvalidOffset for long read procedure

This patch adds handling of invalid offset error for gatt database in
case if offset in read blob would be invalid.

"The Read Blob Request is repeated until the Read Blob Response’s Part
Attribute Value parameter is zero or an Error Response is sent by the server
with the Error Code set to Invalid Offset." Bluetooth Core 5.0, 4.12.2

"If the prepare Value Offset is greater than the current length of the attribute
value then all pending prepare write values shall be discarded for this client,
the queue shall be cleared and then an Error Response shall be sent with the
«Invalid Offset»." Bluetooth Core 5.0, 3.4.6.3

Change-Id: I678ca6984bde4502a3b325fd1822d21d98e6a1a9
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
doc/gatt-api.txt
src/gatt-database.c