diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-02-19 12:59:36 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-02-19 13:10:34 +0100 |
commit | 2c236bebf7c26bfc9eb5d669e66576f29c5042c9 (patch) | |
tree | df67bbcd212e277765008b40e722dd515ff5e727 | |
parent | f11bb26296c04f94e02b281f402d4365cb469f0c (diff) | |
download | gnome-bluetooth-2c236bebf7c26bfc9eb5d669e66576f29c5042c9.tar.gz |
lib: Make setting discovery asynchronous
In some circumstances, setting the discovery mode might be a bit long,
usually because there's another action pending, so send it async. D-Bus
guarantees that the messages will get to the daemon in the same sequence
we sent them, so we're just delaying the changes a bit.
-rw-r--r-- | lib/bluetooth-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c index a4365535..367bdc13 100644 --- a/lib/bluetooth-client.c +++ b/lib/bluetooth-client.c @@ -995,9 +995,9 @@ _bluetooth_client_set_default_adapter_discovering (BluetoothClient *client, priv->discovery_started = discovering; if (discovering) - adapter1_call_start_discovery_sync (ADAPTER1 (adapter), NULL, NULL); + adapter1_call_start_discovery (ADAPTER1 (adapter), NULL, NULL, NULL); else - adapter1_call_stop_discovery_sync (ADAPTER1 (adapter), NULL, NULL); + adapter1_call_stop_discovery (ADAPTER1 (adapter), NULL, NULL, NULL); } static gboolean |