diff --git a/components/bt/host/bluedroid/stack/btm/btm_sec.c b/components/bt/host/bluedroid/stack/btm/btm_sec.c index 0399ec0bdd9..698037a82fc 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_sec.c +++ b/components/bt/host/bluedroid/stack/btm/btm_sec.c @@ -5453,9 +5453,11 @@ static BOOLEAN btm_sec_start_get_name (tBTM_SEC_DEV_REC *p_dev_rec) *******************************************************************************/ static BOOLEAN btm_sec_start_authentication (tBTM_SEC_DEV_REC *p_dev_rec) { - p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING; - - return (btsnd_hcic_auth_request (p_dev_rec->hci_handle)); + if (btsnd_hcic_auth_request (p_dev_rec->hci_handle)) { + p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING; + return TRUE; + } + return FALSE; } /*******************************************************************************