gatt: Fix assuming writes to CCC will always contain 2 bytes
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 6 Sep 2019 11:52:34 +0000 (14:52 +0300)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:59 +0000 (14:27 +0530)
commitb56a938fd6dc4c7f27dcd5323ddeb7d795815c86
treef06e7e12aac309fb7bb90c916a1086382cc3a458
parent6c2395632a10784491faf95fec00c3d2d9726a48
gatt: Fix assuming writes to CCC will always contain 2 bytes

The spec actually allows writing just 1 byte:

BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part F
page 2320:

  'If the attribute value has a fixed length and the Attribute Value
   parameter length is less than or equal to the length of the attribute
   value, the octets of the attribute value parameter length shall be
   written; all other octets in this attribute value shall be
   unchanged.'

Change-Id: I845531fbd44262a5ab29c2353f63c16ed98480bc
Signed-off-by: himanshu <h.himanshu@samsung.com>
src/gatt-database.c