OSDN Git Service

GATT: fix 32 bit UUID handling
authorJakub Pawlowski <jpawlowski@google.com>
Thu, 12 Apr 2018 12:42:31 +0000 (05:42 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 18 Apr 2018 07:10:09 +0000 (07:10 +0000)
commitf107e4f9e841152e5b94fa2f9d68c558d8c1b055
treebbebba7717915687f2df2020d01c3564c6684c37
parenta9575b4fc0f277fe6487c6035700a55d5efcb5b1
GATT: fix 32 bit UUID handling

When writing UUID into stream with gatt_build_uuid_to_stream, we always
use 16bit or 128bit representation. In GATT code returning service UUID,
we were returning 32bit representation lenght, even though 128bit
representation was being returned in the stream. This resulted in
invalid GATT database content being returned, and the service not being
visible.

Bug: 66912853
Test: create GATT database with 32bit UUID, discover from remote device
Change-Id: I791a518ab080bd99db0a8be18d97e865c838fc7e
stack/gatt/gatt_db.cc
stack/gatt/gatt_int.h
stack/gatt/gatt_sr.cc
stack/gatt/gatt_utils.cc