summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2016-05-23 20:01:13 +0200
committerBastien Nocera <hadess@hadess.net>2016-05-23 20:19:36 +0200
commiteb4d8a746bcb53b4db6ace38b939d3006352fe0c (patch)
tree71fbab7c4a785a7d510c33a426a391cff9579499
parent2dd40cacf5cef92e5bfe241fca34237a3676f887 (diff)
downloadgnome-bluetooth-eb4d8a746bcb53b4db6ace38b939d3006352fe0c.tar.gz
lib: Make switching off Discoverable quicker
There's no need to touch the DiscoverableTimeout property when we're switching off Discoverable, it won't do anything.
-rw-r--r--lib/bluetooth-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index fc4b0ff3..169015c8 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1095,7 +1095,7 @@ _bluetooth_client_set_discoverable (BluetoothClient *client,
if (ret == FALSE) {
g_warning ("Failed to set Discoverable to %d: %s", discoverable, error->message);
g_error_free (error);
- } else {
+ } else if (discoverable) {
ret = properties_call_set_sync (properties,
BLUEZ_ADAPTER_INTERFACE,
"DiscoverableTimeout",