From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> 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 -- 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