[gnome-bluetooth/gnome-3-10] lib: Don't forget to set the DiscoverableTimeout too
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/gnome-3-10] lib: Don't forget to set the DiscoverableTimeout too
- Date: Wed, 13 Nov 2013 16:00:42 +0000 (UTC)
commit b713147d87002614d7322a06192dbb79d6675ae7
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 13 15:17:31 2013 +0100
lib: Don't forget to set the DiscoverableTimeout too
Otherwise the visibility will reset after 3 minutes by default.
lib/bluetooth-client.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index d6d5ba2..330c9ed 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -973,6 +973,16 @@ _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 {
+ ret = properties_call_set_sync (properties,
+ BLUEZ_ADAPTER_INTERFACE,
+ "DiscoverableTimeout",
+ g_variant_new_variant (g_variant_new_uint32 (timeout)),
+ NULL, &error);
+ if (ret == FALSE) {
+ g_warning ("Failed to set DiscoverableTimeout to %d: %s", timeout, error->message);
+ g_error_free (error);
+ }
}
g_object_unref (properties);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]