else {
p_tbl->state = AVDT_AD_ST_CONN;
- BTM_SetOutService(p_ccb->peer_addr, BTM_SEC_SERVICE_AVDTP, type);
-
/* call l2cap connect req */
- lcid = L2CA_ConnectReq(AVDT_PSM, p_ccb->peer_addr);
+ lcid =
+ L2CA_ConnectReq2(AVDT_PSM, p_ccb->peer_addr, BTM_SEC_OUT_AUTHENTICATE);
if (lcid != 0) {
/* if connect req ok, store tcid in lcid table */
avdtp_cb.ad.lcid_tbl[lcid - L2CAP_BASE_APPL_CID] =
******************************************************************************/
void AVDT_Register(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback) {
/* register PSM with L2CAP */
- L2CA_Register(AVDT_PSM, (tL2CAP_APPL_INFO*)&avdt_l2c_appl,
- true /* enable_snoop */, nullptr, L2CAP_DEFAULT_MTU);
-
- BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_AVDTP, p_reg->sec_mask, AVDT_PSM);
+ L2CA_Register2(AVDT_PSM, (tL2CAP_APPL_INFO*)&avdt_l2c_appl,
+ true /* enable_snoop */, nullptr, L2CAP_DEFAULT_MTU,
+ p_reg->sec_mask);
/* initialize AVDTP data structures */
avdt_scb_init();
void avdt_ccb_set_conn(AvdtpCcb* p_ccb, tAVDT_CCB_EVT* p_data) {
/* save callback */
p_ccb->p_conn_cback = p_data->connect.p_cback;
-
- /* set security level */
- BTM_SetSecurityLevel(true, "", BTM_SEC_SERVICE_AVDTP,
- BTM_SEC_OUT_AUTHENTICATE, AVDT_PSM, 0, 0);
}
/*******************************************************************************