[gnome-settings-daemon] datetime: Call geoclue's stop method when we no longer need it
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] datetime: Call geoclue's stop method when we no longer need it
- Date: Wed, 2 Apr 2014 15:09:18 +0000 (UTC)
commit 7ff2749984572ff4ae822d56e3c5d935a85743a1
Author: Kalev Lember <kalevlember gmail com>
Date: Wed Apr 2 16:30:56 2014 +0200
datetime: Call geoclue's stop method when we no longer need it
This makes sure the geolocation marker in gnome-shell's status area goes
away after turning Automatic Time Zone off.
Normally, geoclue would watch for the clients to disappear on the bus,
but since we are using a shared singleton connection to the system bus
in gnome-settings-daemon, other plugins can still keep the connection
alive after we unref the dbus connection in the datetime plugin. To let
geoclue know we no longer need it, explicitly call the DBus Stop method
when stopping geolocation.
https://bugzilla.gnome.org/show_bug.cgi?id=723932
plugins/datetime/gsd-timezone-monitor.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/datetime/gsd-timezone-monitor.c b/plugins/datetime/gsd-timezone-monitor.c
index 5b50881..689f281 100644
--- a/plugins/datetime/gsd-timezone-monitor.c
+++ b/plugins/datetime/gsd-timezone-monitor.c
@@ -441,8 +441,12 @@ gsd_timezone_monitor_finalize (GObject *obj)
g_clear_object (&priv->cancellable);
}
+ if (priv->geoclue_client) {
+ geoclue_client_call_stop (priv->geoclue_client, NULL, NULL, NULL);
+ g_clear_object (&priv->geoclue_client);
+ }
+
g_clear_object (&priv->dtm);
- g_clear_object (&priv->geoclue_client);
g_clear_object (&priv->geoclue_manager);
g_clear_object (&priv->permission);
g_clear_pointer (&priv->current_timezone, g_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]