Parent: 41fd2ebfa0e3c04d3a0acdf3b3e9f0b7d9c2632a
Author: Archie Pusaka <apusaka@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-05-11 19:10:01
Tree: 8b85d96d60923d1ef6112f37e2cc06336c79ef23
shared/gatt-server: Fix read multiple charc values According to bluetooth spec Ver 5.2, Vol 3, Part G, 4.8.4, An ATT_ERROR_RSP PDU shall be sent by the server in response to the ATT_READ_MULTIPLE_RSP PDU if insufficient authentication, insufficient authorization, insufficient encryption key size, or insufficient encryption is used by the client, or if a read operation is not permitted on any of the Characteristic Values. Currently if the size of the response grows larger than the MTU size, BlueZ does an early return and not check the permission for the rest of the characteristics. This patch forces BlueZ to check for possible errors even though we already reach MTU size. This patch also moves the read permission check for read multiple characteristics so it is done before actually retrieving the characteristics.
Diffstat
| M | src/shared/gatt-server.c | | | 88 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
1 files changed, 45 insertions(+), 43 deletions(-)