diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-24 12:44:12 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-24 12:44:12 +0000 |
commit | f4211a3cd3442d54fa7877a6c421bee034d46e8e (patch) | |
tree | ca855abf3270c4a7edc5ed28943a65deed6e318e /audio/a2dp.c | |
parent | 666938b54d631956826343ed278e2af4b982fc29 (diff) |
Fix locking of A2DP SEP's
Diffstat (limited to 'audio/a2dp.c')
-rw-r--r-- | audio/a2dp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c index daeda70c..9dfa2aeb 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -1028,6 +1028,9 @@ gboolean a2dp_source_lock(struct device *dev, struct avdtp *session) if (sep->locked) continue; + if (sep->used_by != dev) + continue; + debug("SBC Source SEP %p locked", sep); sep->locked = TRUE; return TRUE; @@ -1045,7 +1048,7 @@ gboolean a2dp_source_unlock(struct device *dev, struct avdtp *session) for (l = sources; l != NULL; l = l->next) { struct a2dp_sep *tmp = l->data; - if (!sep->locked) + if (!tmp->locked) continue; if (tmp->sep && tmp->used_by == dev) { |