OSDN Git Service

Remove bytes after first zero length field in legacy advertisements
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 3 Jan 2018 09:49:41 +0000 (01:49 -0800)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 3 Jan 2018 10:49:24 +0000 (02:49 -0800)
commit5a290f877f5acb29e78533ad45351510cff87497
tree2f21d804fca5ce8781974716c7f27ae219229b75
parent4883a8cbb22fb2ebc39458751bb0fe2ea2f38e5f
Remove bytes after first zero length field in legacy advertisements

This is for compatibility with many existing old devices, that have
non-zero bytes after zero length field. This is currently causing
advertisements to be dropped, rendering those devices invisible.

Bug: 68907583
Test: AdvertiseDataParserTest.RemoveTrailingZerosMalformed
Change-Id: Ib51950f7e0c6a2771f56c6f69108fa10f2517f38
stack/btm/btm_ble_gap.cc
stack/include/advertise_data_parser.h
stack/test/ad_parser_unittest.cc