[PATCH BlueZ] Fix enable fast connectable when connection allowed

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

 



---
 audio/manager.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/audio/manager.c b/audio/manager.c
index 6d294b6..befd887 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -1387,9 +1387,9 @@ gboolean manager_allow_headset_connection(struct audio_device *device)
 		if (dev == device)
 			continue;
 
-		if (bacmp(&dev->src, &device->src))
-			continue;
-
+		if (device)
+			if (bacmp(&dev->src, &device->src))
+				continue;
 		if (!hs)
 			continue;
 
@@ -1407,6 +1407,13 @@ void manager_set_fast_connectable(gboolean enable)
 {
 	GSList *l;
 
+	if (enable) {
+		if (!manager_allow_headset_connection(NULL)) {
+			DBG("Refusing enabling fast connectable");
+			return;
+		}
+	}
+
 	for (l = adapters; l != NULL; l = l->next) {
 		struct audio_adapter *adapter = l->data;
 
-- 
1.7.4.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