diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2014-08-20 10:10:24 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-08-20 10:26:52 +0200 |
commit | 212d3b0fd262d3c1b40b6c532bba0d96cf5ded5c (patch) | |
tree | bd146836daf74fb1a9d8acdb05b419bb3bbe7bbf /android/bluetooth.c | |
parent | e73a294291d9ccfe5ef86c248ccca425a2d05c15 (diff) | |
download | bluez-212d3b0fd262d3c1b40b6c532bba0d96cf5ded5c.tar.gz |
android/bluetooth: Add debug log to select_device_bearer
This patch refactor a bit select_device_bearer function so we can get
debug log out of it. This log might be very useful in dual mode devices
scenarios
Diffstat (limited to 'android/bluetooth.c')
-rw-r--r-- | android/bluetooth.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/android/bluetooth.c b/android/bluetooth.c index a00edec8a..984ecbad5 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -4213,14 +4213,21 @@ static void pair_device_complete(uint8_t status, uint16_t length, static uint8_t select_device_bearer(struct device *dev) { + uint8_t res; + if (dev->bredr && dev->le) { if (dev->le_seen > dev->bredr_seen) - return dev->bdaddr_type; + res = dev->bdaddr_type; + else + res = BDADDR_BREDR; - return BDADDR_BREDR; + } else { + res = dev->bredr ? BDADDR_BREDR : dev->bdaddr_type; } - return dev->bredr ? BDADDR_BREDR : dev->bdaddr_type; + DBG("Selected bearer %d", res); + + return res; } uint8_t bt_device_last_seen_bearer(const bdaddr_t *bdaddr) |