component/bt: Fix the bug of can't pair if master send pair req but slave don't send sec req.

This commit is contained in:
Yulong
2017-10-11 03:33:20 -04:00
committed by yulong
parent 9274814268
commit da32fbce7a
2 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -1413,7 +1413,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
switch (sec_act) {
case BTM_BLE_SEC_ENCRYPT:
if (link_role == BTM_ROLE_MASTER) {
if (link_role == BTM_ROLE_MASTER && (p_rec->ble.key_type & BTM_LE_KEY_PENC)) {
/* start link layer encryption using the security info stored */
cmd = btm_ble_start_encrypt(bd_addr, FALSE, NULL);
break;