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