OSDN Git Service

Fixes setting of service uuid mask during BLE APCF scan
authorSubramanian Srinivasan <subrsrin@codeaurora.org>
Mon, 24 Aug 2015 19:17:03 +0000 (12:17 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Fri, 14 Oct 2016 21:46:35 +0000 (14:46 -0700)
commit96d078b59d2df937caad491a234fab7b1a414546
tree04e4238e8ff5e461c49163f82c47fdec339039fd
parentd20c0d7bb6b0784d2794270472a297f5018b08d7
Fixes setting of service uuid mask during BLE APCF scan

Fixes setting of incorrect service uuid mask bytes in vendor
specific command when service uuid mask length is less than
the length of service uuid APCF filter.
eg:ServiceUuid:12131215-0000-1000-8000-00805F9B34FB
SvcMaskUuid:0000FFFF-0000-1000-8000-00805F9B34FB
In the above eg, user is trying to apply 32 bit service uuid
mask on 32 bit service uuid. But the stack treats the
service uuid mask as 16 bits and inserts garbage values for
the first 16 bits of service uuid mask in the VS command
since the MSB bits of the mask are zeroes. This change fixes
the scenario where service uuid mask length is less than
service uuid length.

Change-Id: Ie1aece1162b1ba7f4b7a3e9eea7eb5a074f85d62
btif/include/btif_gatt_util.h
btif/src/btif_gatt_client.cc
btif/src/btif_gatt_util.cc