Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/5] core: Fix set_pairable to not attempt to power on the adapter
@ 2012-12-17 15:45 Luiz Augusto von Dentz
  2012-12-17 15:45 ` [PATCH BlueZ 2/5] core: Fix set_discoverable " Luiz Augusto von Dentz
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2012-12-17 15:45 UTC (permalink / raw)
  To: linux-bluetooth

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

Pairable flag is completely independent flag for the kernel so we can
reflect this in the D-Bus API.
---
 src/adapter.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 96a23e9..375bff4 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -417,29 +417,9 @@ static void set_powered(struct btd_adapter *adapter, gboolean powered,
 static void set_pairable(struct btd_adapter *adapter, gboolean pairable,
 				bool reply, GDBusPendingPropertySet id)
 {
-	int err;
-
-	if (!adapter->connectable)
-		return g_dbus_pending_property_error(id,
-						ERROR_INTERFACE ".NotReady",
-						"Resource Not Ready");
-
 	if (pairable == adapter->pairable)
 		goto done;
 
-	if (!adapter->discoverable)
-		goto store;
-
-	err = set_mode(adapter, MODE_DISCOVERABLE);
-	if (err < 0) {
-		if (reply)
-			g_dbus_pending_property_error(id,
-						ERROR_INTERFACE ".Failed",
-						strerror(-err));
-		return;
-	}
-
-store:
 	mgmt_set_pairable(adapter->dev_id, pairable);
 
 done:
-- 
1.7.11.7


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

end of thread, other threads:[~2012-12-17 18:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 15:45 [PATCH BlueZ 1/5] core: Fix set_pairable to not attempt to power on the adapter Luiz Augusto von Dentz
2012-12-17 15:45 ` [PATCH BlueZ 2/5] core: Fix set_discoverable " Luiz Augusto von Dentz
2012-12-17 15:45 ` [PATCH BlueZ 3/5] core: Simplify set_powered to not use set_mode Luiz Augusto von Dentz
2012-12-17 15:55   ` Anderson Lizardo
2012-12-17 18:30     ` Johan Hedberg
2012-12-17 15:45 ` [PATCH BlueZ 4/5] core: Remove mode session code Luiz Augusto von Dentz
2012-12-17 15:45 ` [PATCH BlueZ 5/5] core: Fix emitting changes to properties on power off Luiz Augusto von Dentz
2012-12-17 15:51 ` [PATCH BlueZ 1/5] core: Fix set_pairable to not attempt to power on the adapter Johan Hedberg

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