[gnome-bluetooth] lib: Make switching off Discoverable quicker



commit eb4d8a746bcb53b4db6ace38b939d3006352fe0c
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 23 20:01:13 2016 +0200

    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.

 lib/bluetooth-client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index fc4b0ff..169015c 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",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]