[gnome-settings-daemon/gnome-3-24] housekeeping: own the dbus name so the service can be contacted
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-24] housekeeping: own the dbus name so the service can be contacted
- Date: Mon, 5 Mar 2018 15:31:30 +0000 (UTC)
commit a86bef4e62b6666cbeec53544f9edde3b596ada6
Author: Sebastien Bacher <seb128 ubuntu com>
Date: Tue Oct 10 10:58:00 2017 +0200
housekeeping: own the dbus name so the service can be contacted
https://bugzilla.gnome.org/show_bug.cgi?id=737624
plugins/housekeeping/gsd-housekeeping-manager.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c
index 7a837cfe..2abddebc 100644
--- a/plugins/housekeeping/gsd-housekeeping-manager.c
+++ b/plugins/housekeeping/gsd-housekeeping-manager.c
@@ -56,6 +56,7 @@ struct GsdHousekeepingManagerPrivate {
GDBusNodeInfo *introspection_data;
GDBusConnection *connection;
GCancellable *bus_cancellable;
+ guint name_id;
};
#define GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerPrivate))
@@ -354,6 +355,14 @@ on_bus_gotten (GObject *source_object,
NULL,
NULL);
}
+
+ manager->priv->name_id = g_bus_own_name_on_connection (connection,
+ "org.gnome.SettingsDaemon.Housekeeping",
+ G_BUS_NAME_OWNER_FLAGS_NONE,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
}
static void
@@ -414,6 +423,11 @@ gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager)
g_debug ("Stopping housekeeping manager");
+ if (manager->priv->name_id != 0) {
+ g_bus_unown_name (manager->priv->name_id);
+ manager->priv->name_id = 0;
+ }
+
g_clear_object (&p->bus_cancellable);
g_clear_pointer (&p->introspection_data, g_dbus_node_info_unref);
g_clear_object (&p->connection);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]