OSDN Git Service

gd HCI: fix failed assertion about extended_properties
authorChienyuan <chienyuanhuang@google.com>
Tue, 1 Sep 2020 12:38:12 +0000 (20:38 +0800)
committerChienyuan Huang <chienyuanhuang@google.com>
Wed, 2 Sep 2020 06:40:32 +0000 (06:40 +0000)
Bug: 159815595
Tag: #gd-refactor
Test: gd/cert/run --host
Test: manual
Change-Id: Ie910933ed1e9c9619fc0eddd03e41576513ec207

gd/hci/le_advertising_manager.cc

index c702116..efb4262 100644 (file)
@@ -317,6 +317,7 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
       uint8_t legacy_properties = (config.connectable ? 0x1 : 0x00) | (config.scannable ? 0x2 : 0x00) |
                                   (config.directed ? 0x4 : 0x00) | (config.high_duty_directed_connectable ? 0x8 : 0x00);
       uint8_t extended_properties = (config.anonymous ? 0x20 : 0x00) | (config.include_tx_power ? 0x40 : 0x00);
+      extended_properties = extended_properties >> 5;
 
       le_advertising_interface_->EnqueueCommand(
           hci::LeSetExtendedAdvertisingParametersBuilder::Create(