Loading system/stack/btm/btm_ble.c +10 −4 Original line number Original line Diff line number Diff line Loading @@ -1177,12 +1177,18 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin case BTM_BLE_SEC_ENCRYPT: case BTM_BLE_SEC_ENCRYPT: if (link_role == BTM_ROLE_MASTER) if (link_role == BTM_ROLE_MASTER) { { if(p_rec->sec_state == BTM_SEC_STATE_ENCRYPTING) { BTM_TRACE_DEBUG0 ("State is already encrypting::"); cmd = BTM_CMD_STARTED; } else { /* start link layer encryption using the security info stored */ /* start link layer encryption using the security info stored */ if (btm_ble_start_encrypt(bd_addr, FALSE, NULL)) if (btm_ble_start_encrypt(bd_addr, FALSE, NULL)) { { p_rec->sec_state = BTM_SEC_STATE_ENCRYPTING; p_rec->sec_state = BTM_SEC_STATE_ENCRYPTING; cmd = BTM_CMD_STARTED; cmd = BTM_CMD_STARTED; } } } break; break; } } /* if salve role then fall through to call SMP_Pair below which will send a /* if salve role then fall through to call SMP_Pair below which will send a Loading Loading
system/stack/btm/btm_ble.c +10 −4 Original line number Original line Diff line number Diff line Loading @@ -1177,12 +1177,18 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin case BTM_BLE_SEC_ENCRYPT: case BTM_BLE_SEC_ENCRYPT: if (link_role == BTM_ROLE_MASTER) if (link_role == BTM_ROLE_MASTER) { { if(p_rec->sec_state == BTM_SEC_STATE_ENCRYPTING) { BTM_TRACE_DEBUG0 ("State is already encrypting::"); cmd = BTM_CMD_STARTED; } else { /* start link layer encryption using the security info stored */ /* start link layer encryption using the security info stored */ if (btm_ble_start_encrypt(bd_addr, FALSE, NULL)) if (btm_ble_start_encrypt(bd_addr, FALSE, NULL)) { { p_rec->sec_state = BTM_SEC_STATE_ENCRYPTING; p_rec->sec_state = BTM_SEC_STATE_ENCRYPTING; cmd = BTM_CMD_STARTED; cmd = BTM_CMD_STARTED; } } } break; break; } } /* if salve role then fall through to call SMP_Pair below which will send a /* if salve role then fall through to call SMP_Pair below which will send a Loading