summaryrefslogtreecommitdiff
path: root/android/health.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-08-11 19:23:32 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-08-13 17:29:29 +0300
commit87a957998a4dfad55a26007b94950928d82b54a6 (patch)
tree607bae1bcfaafdc2f643dd606b1d7d7c57f6db45 /android/health.c
parentbf672a2808513c94a59bc891277a6e2d50aaee08 (diff)
downloadbluez-87a957998a4dfad55a26007b94950928d82b54a6.tar.gz
android/health: Fix reconnect scenario
When trying to reconnect to HDP device, BfA tries to connect MDL even MCL is not connected. D/BlueZ ( 2218): external/bluetooth/bluez/android/hal-health.c:connect_channel() I/bluetoothd( 2220): bluetoothd[2221]: external/bluetooth/bluez/android/health.c:bt_health_connect_channel() I/bluetoothd( 2220): bluetoothd[2221]: external/bluetooth/bluez/android/health.c:create_channel() mdep 1 D/BlueZ ( 2218): external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 0 I/bluetoothd( 2220): bluetoothd[2221]: external/bluetooth/bluez/android/mcap-lib.c:mcap_create_mdl() I/bluetoothd( 2220): bluetoothd[2221]: health: error creating mdl MCL is not connected This patch makes sure that MCL is connected before trying to connect MDL.
Diffstat (limited to 'android/health.c')
-rw-r--r--android/health.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/health.c b/android/health.c
index 2d80365b3..f4edc3eda 100644
--- a/android/health.c
+++ b/android/health.c
@@ -1949,7 +1949,7 @@ static void bt_health_connect_channel(const void *buf, uint16_t len)
}
}
- if (!dev->mcl) {
+ if (!dev->mcl || (dev->mcl && !dev->mcl_conn)) {
if (connect_mcl(channel) < 0) {
error("health: error retrieving HDP SDP record");
goto fail;