diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-05-25 17:56:33 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:21 -0700 |
commit | 4583aa99e8985f15f81c3e069a29ac0fa7cc1f83 (patch) | |
tree | eb16a6403b8b2cce7a63fff1e22ad54a18164b00 /btif | |
parent | a9757e5e488512003362c4f8bf8f5f005374ad55 (diff) | |
download | external_bluetooth_bluedroid-4583aa99e8985f15f81c3e069a29ac0fa7cc1f83.zip external_bluetooth_bluedroid-4583aa99e8985f15f81c3e069a29ac0fa7cc1f83.tar.gz external_bluetooth_bluedroid-4583aa99e8985f15f81c3e069a29ac0fa7cc1f83.tar.bz2 |
If the peer supports both source and sink role, peer initiated connections were ending up in a bad state (infinite loop). Resolve this by terminating the getcap on successful codec match
Change-Id: I8d669f4ff06284e601525e3b4ab025f10fd4abeb
Diffstat (limited to 'btif')
-rw-r--r-- | btif/co/bta_av_co.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/btif/co/bta_av_co.c b/btif/co/bta_av_co.c index 01cf4e6..7d363e0 100644 --- a/btif/co/bta_av_co.c +++ b/btif/co/bta_av_co.c @@ -100,6 +100,7 @@ typedef struct BD_ADDR addr; /* address of audio/video peer */ tBTA_AV_CO_SINK snks[BTIF_SV_AV_AA_SEP_INDEX]; /* array of supported sinks */ UINT8 num_snks; /* total number of sinks at peer */ + UINT8 num_seps; /* total number of seids at peer */ UINT8 num_rx_snks; /* number of received sinks */ UINT8 num_sup_snks; /* number of supported sinks in the snks array */ tBTA_AV_CO_SINK *p_snk; /* currently selected sink */ @@ -324,6 +325,7 @@ BTA_API void bta_av_co_audio_disc_res(tBTA_AV_HNDL hndl, UINT8 num_seps, UINT8 n /* Copy the discovery results */ bdcpy(p_peer->addr, addr); p_peer->num_snks = num_snk; + p_peer->num_seps = num_seps; p_peer->num_rx_snks = 0; p_peer->num_sup_snks = 0; } @@ -423,7 +425,7 @@ BTA_API UINT8 bta_av_co_audio_getconfig(tBTA_AV_HNDL hndl, tBTA_AV_CODEC codec_t /* stop fetching caps once we retrieved a supported codec */ if (p_peer->acp) { - *p_sep_info_idx = p_peer->num_snks; + *p_sep_info_idx = p_peer->num_seps; APPL_TRACE_EVENT0("no need to fetch more SEPs"); } |