summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-12-07 08:03:02 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-12-07 08:03:02 +0000
commitc7514bc9b27c43fadfcb02180e7d8875890c7820 (patch)
tree43757c910ad279cd35837180c98d14f69fbb7b46
parent1ddd76afa25d775788e3762ab731cad80f8ffe56 (diff)
Fix BT_GETCAPABILITIES when the headset has already been acting as INT
-rw-r--r--audio/avdtp.c8
-rw-r--r--audio/unix.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index b0b5b7cd..98cce35f 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -1824,12 +1824,12 @@ static gboolean avdtp_discover_resp(struct avdtp *session,
resp->seps[i].seid, resp->seps[i].type,
resp->seps[i].media_type, resp->seps[i].inuse);
- /* Skip SEP's which are in use */
- if (resp->seps[i].inuse)
- continue;
-
sep = find_remote_sep(session->seps, resp->seps[i].seid);
if (!sep) {
+ if (resp->seps[i].inuse &&
+ !find_stream_by_rseid(session,
+ resp->seps[i].seid))
+ continue;
sep = g_new0(struct avdtp_remote_sep, 1);
session->seps = g_slist_append(session->seps, sep);
}
diff --git a/audio/unix.c b/audio/unix.c
index d3e7485c..31e1dcb2 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -364,9 +364,10 @@ static void a2dp_discovery_complete(struct avdtp *session, GSList *seps,
codec_cap = (void *) cap->data;
- if (codec_cap->media_codec_type == A2DP_CODEC_SBC && !sbc_cap)
+ if (codec_cap->media_codec_type == A2DP_CODEC_SBC && !sbc_cap) {
sbc_cap = (void *) codec_cap;
-
+ break;
+ }
}
/* endianess prevent direct cast */