[PATCHv2] android/handsfree: Return default device for zero bdaddr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

For the old Android API use find_default_device() function.
---
 android/handsfree.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/android/handsfree.c b/android/handsfree.c
index b410f5d..33fcbdd 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -290,6 +290,9 @@ static bool match_by_bdaddr(const void *data, const void *match_data)
 
 static struct hf_device *find_device(const bdaddr_t *bdaddr)
 {
+	if (!bacmp(bdaddr, BDADDR_ANY))
+		return find_default_device();
+
 	return queue_find(devices, match_by_bdaddr, bdaddr);
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux