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
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;
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;