summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2013-03-04 17:48:52 -0300
committerDenis Kenzior <denkenz@gmail.com>2013-03-04 16:41:51 -0600
commita6874a64b2c4ff377549dbf1a81ce3bec809e03a (patch)
tree74dde1c16c117167cdf8e2d1a0a111eef5b4cbfc /src
parent2c4015278d1b1347228360dc2de3831ae0bd688a (diff)
downloadofono-a6874a64b2c4ff377549dbf1a81ce3bec809e03a.tar.bz2
handsfree-audio: Reject SCO if Card is not ready
The Audio Card is being created when the NewConnection from BlueZ Profile is received, and registered when the service level connection negotiation finishes. This patch rejects SCO connection if the SCO incoming connection arrives when the service level negotiation is ongoing.
Diffstat (limited to 'src')
-rw-r--r--src/handsfree-audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index 14872b0e..857c258d 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
@@ -138,7 +138,7 @@ static gboolean sco_accept(GIOChannel *io, GIOCondition cond,
bt_ba2str(&saddr.sco_bdaddr, local);
card = card_find(remote, local);
- if (card == NULL) {
+ if (card == NULL || card->path == NULL) {
ofono_error("Rejecting SCO: Audio Card not found!");
close(nsk);
return TRUE;