Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/5] Fix issue when setting limited discoverable mode
@ 2010-10-28  8:00 Luiz Augusto von Dentz
  2010-10-28  8:00 ` [PATCH 2/5] Fix not waiting mode change when setting powered property Luiz Augusto von Dentz
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2010-10-28  8:00 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>

When setting limited discoverable mode it will always switch to
discoverable on adapter_mode_changed which doesn't match the pending mode
requested.
---
 src/adapter.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 4a9f34e..98d96e2 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3225,9 +3225,10 @@ void adapter_mode_changed(struct btd_adapter *adapter, uint8_t scan_mode)
 					DBUS_TYPE_BOOLEAN, &pairable);
 
 	if (discoverable && adapter->pairable && adapter->discov_timeout > 0 &&
-						adapter->discov_timeout <= 60)
+						adapter->discov_timeout <= 60) {
+		adapter->mode = MODE_LIMITED;
 		adapter_set_limited_discoverable(adapter, TRUE);
-	else if (!discoverable)
+	} else if (!discoverable)
 		adapter_set_limited_discoverable(adapter, FALSE);
 
 	emit_property_changed(connection, path,
-- 
1.7.1


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

end of thread, other threads:[~2010-10-28 19:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28  8:00 [PATCH 1/5] Fix issue when setting limited discoverable mode Luiz Augusto von Dentz
2010-10-28  8:00 ` [PATCH 2/5] Fix not waiting mode change when setting powered property Luiz Augusto von Dentz
2010-10-28 18:28   ` Johan Hedberg
2010-10-28  8:00 ` [PATCH 3/5] Fix setting Discoverable when adapter is down Luiz Augusto von Dentz
2010-10-28 19:00   ` Johan Hedberg
2010-10-28  8:00 ` [PATCH 4/5] Fix not replying when mode is limited discoverable or discoverable Luiz Augusto von Dentz
2010-10-28  8:00 ` [PATCH 5/5] Fix not being able to set discoverable when discoverable timeout is set Luiz Augusto von Dentz
2010-10-28 18:24 ` [PATCH 1/5] Fix issue when setting limited discoverable mode Johan Hedberg

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