summaryrefslogtreecommitdiffstats
path: root/btif/src/btif_dm.c
diff options
context:
space:
mode:
Diffstat (limited to 'btif/src/btif_dm.c')
-rwxr-xr-xbtif/src/btif_dm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 5eb46a0..b5cac5d 100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -765,7 +765,13 @@ static void btif_dm_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl)
status = BT_STATUS_RMT_DEV_DOWN;
break;
+ /* map the auth failure codes, so we can retry pairing if necessary */
case HCI_ERR_AUTH_FAILURE:
+ case HCI_ERR_HOST_REJECT_SECURITY:
+ case HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE:
+ case HCI_ERR_UNIT_KEY_USED:
+ case HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED:
+ case HCI_ERR_INSUFFCIENT_SECURITY:
BTIF_TRACE_DEBUG1(" %s() Authentication fail ", __FUNCTION__);
if (pairing_cb.autopair_attempts == 1)
{
@@ -1117,7 +1123,7 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param)
bt_status_t status;
bt_property_t prop;
prop.type = BT_PROPERTY_BDNAME;
- prop.len = 0;
+ prop.len = BD_NAME_LEN;
prop.val = (void*)bdname;
status = btif_storage_get_adapter_property(&prop);