From a03e5f95be34498f6711d0a621849275e8f09c4d Mon Sep 17 00:00:00 2001 From: Yulong Date: Wed, 14 Jun 2017 09:01:29 -0400 Subject: [PATCH] component/bt: Added the judgment to check the address is public or not. --- components/bt/bluedroid/stack/btm/btm_ble_addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/bluedroid/stack/btm/btm_ble_addr.c b/components/bt/bluedroid/stack/btm/btm_ble_addr.c index 5c4c772e6c..4f6c443a5b 100644 --- a/components/bt/bluedroid/stack/btm/btm_ble_addr.c +++ b/components/bt/bluedroid/stack/btm/btm_ble_addr.c @@ -494,7 +494,7 @@ BOOLEAN btm_random_pseudo_to_identity_addr(BD_ADDR random_pseudo, UINT8 *p_stati if (p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) { * p_static_addr_type = p_dev_rec->ble.static_addr_type; memcpy(random_pseudo, p_dev_rec->ble.static_addr, BD_ADDR_LEN); - if (controller_get_interface()->supports_ble_privacy()) { + if (controller_get_interface()->supports_ble_privacy() && p_dev_rec->ble.ble_addr_type != BLE_ADDR_PUBLIC) { *p_static_addr_type |= BLE_ADDR_TYPE_ID_BIT; } return TRUE; -- 2.40.0