summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorBharat Panda <bharat.panda@samsung.com>2015-11-13 19:07:13 +0530
committerBharat Panda <bharat.panda@samsung.com>2015-11-13 19:07:13 +0530
commit45dc9f0e65df9f5a7b9c9bbca4b706718906d230 (patch)
tree246086452c9aaada1566ae08350f4a1babc16fc5 /profiles
parent4308548cc560a89a9f15fe577f0a51d0435c2a87 (diff)
downloadbluez-45dc9f0e65df9f5a7b9c9bbca4b706718906d230.tar.gz
bluez-45dc9f0e65df9f5a7b9c9bbca4b706718906d230.tar.bz2
bluez-45dc9f0e65df9f5a7b9c9bbca4b706718906d230.zip
audio: Fix not resetting connect_id
Ever since discovery can be canceled connect_id is now set while discovering so it needs to be reset on the callback otherwise it will cause .connect to always return -EBUSY until .disconnect is called. git repo link: http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=a1a01a6f95fb3715dd7aa27af3543b6cb0a62da7 Change-Id: Ibd5af39c1346536f11a45390d3f262b2fcc15fa1
Diffstat (limited to 'profiles')
-rw-r--r--profiles/audio/sink.c2
-rw-r--r--profiles/audio/source.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index cdd89b42..80caa091 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
@@ -242,6 +242,8 @@ static void discovery_complete(struct avdtp *session, GSList *seps, struct avdtp
struct sink *sink = user_data;
int id, perr;
+ sink->connect_id = 0;
+
if (err) {
avdtp_unref(sink->session);
sink->session = NULL;
diff --git a/profiles/audio/source.c b/profiles/audio/source.c
index 11e4cffb..e834c77f 100644
--- a/profiles/audio/source.c
+++ b/profiles/audio/source.c
@@ -227,6 +227,8 @@ static void discovery_complete(struct avdtp *session, GSList *seps, struct avdtp
struct source *source = user_data;
int id, perr;
+ source->connect_id = 0;
+
if (err) {
avdtp_unref(source->session);
source->session = NULL;