components/bt/host/bluedroid/stack/btm/btm_sec.c
/*******************************************************************************
**
** Function         btm_sec_find_dev_by_sec_state
**
** Description      Look for the record in the device database for the device
**                  which is being authenticated or encrypted
**
** Returns          Pointer to the record or NULL
**
*******************************************************************************/
Function         btm_sec_find_dev_by_sec_state
Description      Look for the record in the device database for the device
which is being authenticated or encrypted

Returns          Pointer to the record or NULL
Function btm_sec_find_dev_by_sec_state Description Look for the record in the device database for the device which is being authenticated or encrypted Returns Pointer to the record or NULL
tBTM_SEC_DEV_REC *btm_sec_find_dev_by_sec_state (UINT8 state)
{
#if (SMP_INCLUDED == TRUE)
    tBTM_SEC_DEV_REC *p_dev_rec = NULL;
    list_node_t *p_node = NULL;
    for (p_node = list_begin(btm_cb.p_sec_dev_rec_list); p_node; p_node = list_next(p_node)) {
        p_dev_rec = list_node(p_node);
	if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE)
                && (p_dev_rec->sec_state == state)) {
            return (p_dev_rec);
        }
    }
#endif  
    return (NULL);
}
tBTM_SEC_DEV_REC * btm_sec_find_dev_by_sec_state ( UINT8 state ) { #if ( SMP_INCLUDED == TRUE ) tBTM_SEC_DEV_REC * p_dev_rec = NULL ; list_node_t * p_node = NULL ; for ( p_node = list_begin ( btm_cb . p_sec_dev_rec_list ) ; p_node ; p_node = list_next ( p_node ) ) { p_dev_rec = list_node ( p_node ) ; if ( ( p_dev_rec -> sec_flags & BTM_SEC_IN_USE ) && ( p_dev_rec -> sec_state == state ) ) { return ( p_dev_rec ) ; } } #endif return ( NULL ) ; }
Function         btm_sec_find_dev_by_sec_state
Description      Look for the record in the device database for the device
which is being authenticated or encrypted
Function btm_sec_find_dev_by_sec_state Description Look for the record in the device database for the device which is being authenticated or encrypted
///SMP_INCLUDED == TRUE