OSDN Git Service

Don't notify legacy advertiser in master role.
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 1 Nov 2017 21:03:39 +0000 (14:03 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 1 Nov 2017 21:07:31 +0000 (14:07 -0700)
Legacy advertiser should be notified about connection success only
if we're the slave of connection.

Bug: 68712406
Test: bonding with device while using legacy advertising
Change-Id: I4790fb9c8a4f58ea76f6b28fd5384479f2fee0d8

stack/btm/btm_ble.cc

index 4b141da..f013a03 100644 (file)
@@ -1999,7 +1999,8 @@ void btm_ble_conn_complete(uint8_t* p, UNUSED_ATTR uint16_t evt_len,
 
   btm_ble_update_mode_operation(role, &bda, status);
 
-  btm_ble_advertiser_notify_terminated_legacy(status, handle);
+  if (role == HCI_ROLE_SLAVE)
+    btm_ble_advertiser_notify_terminated_legacy(status, handle);
 }
 
 /*****************************************************************************