components/bt/host/bluedroid/stack/btm/btm_sec.c
/*******************************************************************************
**
** Function         btm_sec_queue_encrypt_request
**
** Description      encqueue encryption request when device has active security
**                  process pending.
**
*******************************************************************************/
Function         btm_sec_queue_encrypt_request
Description      encqueue encryption request when device has active security
process pending.
Function btm_sec_queue_encrypt_request Description encqueue encryption request when device has active security process pending .
static BOOLEAN btm_sec_queue_encrypt_request (BD_ADDR bd_addr, tBT_TRANSPORT transport,
        tBTM_SEC_CALLBACK *p_callback, void *p_ref_data)
{
    tBTM_SEC_QUEUE_ENTRY  *p_e;
    p_e = (tBTM_SEC_QUEUE_ENTRY *)osi_malloc(sizeof(tBTM_SEC_QUEUE_ENTRY) + 1);
    if (p_e) {
        p_e->psm  = 0;  
        p_e->p_callback  = p_callback;
        p_e->p_ref_data = (void *)(p_e + 1);
        *(UINT8 *)p_e->p_ref_data = *(UINT8 *)(p_ref_data);
        p_e->transport  = transport;
        memcpy(p_e->bd_addr, bd_addr, BD_ADDR_LEN);
        fixed_queue_enqueue(btm_cb.sec_pending_q, p_e, FIXED_QUEUE_MAX_TIMEOUT);
        return TRUE;
    }
    return FALSE;
}
static BOOLEAN btm_sec_queue_encrypt_request ( BD_ADDR bd_addr , tBT_TRANSPORT transport , tBTM_SEC_CALLBACK * p_callback , void * p_ref_data ) { tBTM_SEC_QUEUE_ENTRY * p_e ; p_e = ( tBTM_SEC_QUEUE_ENTRY * ) osi_malloc ( sizeof ( tBTM_SEC_QUEUE_ENTRY ) + 1 ) ; if ( p_e ) { p_e -> psm = 0 ; p_e -> p_callback = p_callback ; p_e -> p_ref_data = ( void * ) ( p_e + 1 ) ; * ( UINT8 * ) p_e -> p_ref_data = * ( UINT8 * ) ( p_ref_data ) ; p_e -> transport = transport ; memcpy ( p_e -> bd_addr , bd_addr , BD_ADDR_LEN ) ; fixed_queue_enqueue ( btm_cb . sec_pending_q , p_e , FIXED_QUEUE_MAX_TIMEOUT ) ; return TRUE ; } return FALSE ; }
Function         btm_sec_queue_encrypt_request
Description      encqueue encryption request when device has active security
process pending.
Function btm_sec_queue_encrypt_request Description encqueue encryption request when device has active security process pending .
/* if PSM 0, encryption request */