From 721862c9110eeb08d069d79bdd8707d9192d4f92 Mon Sep 17 00:00:00 2001 From: Bharat Panda Date: Tue, 10 Nov 2015 10:29:40 +0530 Subject: [PATCH] audio: Fix audio service state When profile .disconnect is called the state of the service is already set to disconnecting this is make no sense to call btd_service_connect_complete as it will do nothing and the state will never be updated to disconnected as it should. git repo link: http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=e316a77f5a5fd4675c5b1f0da8a52fc253233054 Change-Id: I9780763b6265d27b4a6957a18fb0b352b3d72a9c --- profiles/audio/sink.c | 2 +- profiles/audio/source.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c index 78a6887..750b710 100644 --- a/profiles/audio/sink.c +++ b/profiles/audio/sink.c @@ -441,7 +441,7 @@ int sink_disconnect(struct btd_service *service) if (sink->connect_id > 0) { a2dp_cancel(sink->connect_id); sink->connect_id = 0; - btd_service_connecting_complete(sink->service, -ECANCELED); + btd_service_connecting_complete(sink->service, 0); avdtp_unref(sink->session); sink->session = NULL; diff --git a/profiles/audio/source.c b/profiles/audio/source.c index b235a7d..43c20c2 100644 --- a/profiles/audio/source.c +++ b/profiles/audio/source.c @@ -398,7 +398,7 @@ int source_disconnect(struct btd_service *service) if (source->connect_id > 0) { a2dp_cancel(source->connect_id); source->connect_id = 0; - btd_service_connecting_complete(source->service, -ECANCELED); + btd_service_connecting_complete(source->service, 0); avdtp_unref(source->session); source->session = NULL; -- 2.7.4