Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 784a279f authored by Zach Johnson's avatar Zach Johnson
Browse files

Fold out service setting into avdt_ad_open_req

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a6cab8471c5887c22527231aa6551f9b101ec3d
parent d77ae824
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "l2c_api.h"
#include "l2cdefs.h"
#include "osi/include/osi.h"
#include "stack/btm/btm_sec.h"

AvdtpScb* AvdtpAdaptationLayer::LookupAvdtpScb(
    const AvdtpTransportChannel& tc) {
@@ -550,6 +551,8 @@ void avdt_ad_open_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb,
  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);
    if (lcid != 0) {
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ static void avdt_ccb_clear_ccb(AvdtpCcb* p_ccb) {
 *
 ******************************************************************************/
void avdt_ccb_chan_open(AvdtpCcb* p_ccb, UNUSED_ATTR tAVDT_CCB_EVT* p_data) {
  BTM_SetOutService(p_ccb->peer_addr, BTM_SEC_SERVICE_AVDTP, AVDT_CHAN_SIG);
  avdt_ad_open_req(AVDT_CHAN_SIG, p_ccb, NULL, AVDT_INT);
}