summaryrefslogtreecommitdiffstats
path: root/audio/avdtp.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-12-07 08:14:01 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-12-07 08:14:01 +0000
commit29d3944a4099800ed3c27e3389acc5c7eb326805 (patch)
tree3f37f888cd38b82d0a7dc2614b9512adaa547d97 /audio/avdtp.c
parentbcc1d569bcfb0cd026930eb6a8ee607a8002f523 (diff)
Make sure remote SEP cache and active streams stay in sync
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r--audio/avdtp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 98cce35f..955576b7 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -1812,6 +1812,7 @@ static gboolean avdtp_discover_resp(struct avdtp *session,
struct discover_resp *resp, int size)
{
int sep_count, i, isize = sizeof(struct seid_info);
+ struct avdtp_stream *stream;
sep_count = (size - sizeof(struct avdtp_header)) / isize;
@@ -1824,16 +1825,17 @@ 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);
+ stream = find_stream_by_rseid(session, resp->seps[i].seid);
+
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))
+ if (resp->seps[i].inuse && !stream)
continue;
sep = g_new0(struct avdtp_remote_sep, 1);
session->seps = g_slist_append(session->seps, sep);
}
+ sep->stream = stream;
sep->seid = resp->seps[i].seid;
sep->type = resp->seps[i].type;
sep->media_type = resp->seps[i].media_type;