OSDN Git Service

Clear remote BD address if SDP search fails
authorSatish Kodishala <skodisha@codeaurora.org>
Thu, 25 Jun 2015 08:53:17 +0000 (14:23 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Thu, 3 Mar 2016 18:02:19 +0000 (18:02 +0000)
commitbf9252da1bb9d542c962de6c94a9ea788835a08e
tree1c80eff69e44078907bed270474e9d642a75eb4a
parent43c94c96cbd50b5cd34d970bfeba8e9c88f528ce
Clear remote BD address if SDP search fails

Use case:
1. Enable multi hf.
2. Pair and connect to a headset.
3. Turn off headset and try connecting to headset from AG.
4. After the connection fails, turn on headset.
5. Make sure headset initiates HF connection to AG.
6. Make MO/MT call, switch from headset to AG, vice versa using headset.

Failure:
When call is transferred from AG to headset, headset initiated
SCO connection request is rejected by AG.

Root cause:
For outgoing connection in step 3, SDP search fails. BD address of
remote headset is stored in scb[0]. BD address of headset with which
we tried to connect is not cleared in scb[0].

When incoming HF connection request is accepted in step 5, BD address
of headset is stored in scb[1]. Now, BD address of the same headset is
stored in both scb[0], scb[1].

When SCO connection request is received from headset, we get scb
information using BD address. However, since BD address in scb[0]
is not cleared, we end up selecting scb[0] for which there is no
headset connected. This makes us think that remote is initiating
SCO connection without SLC and we reject the SCO connection.

Fix:
Clear the BD address of remote when SDP search fails.

Change-Id: I21a0b83fcd47fed91e28fe27bdfd6d541b6a527c
bta/ag/bta_ag_act.c