Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] Fix enable fast connectable when connection allowed
@ 2011-11-11  9:11 Dmitriy Paliy
  2011-11-14 12:10 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitriy Paliy @ 2011-11-11  9:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Dmitriy Paliy

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-14 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11  9:11 [PATCH BlueZ] Fix enable fast connectable when connection allowed Dmitriy Paliy
2011-11-14 12:10 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox