[gdm] manager: don't try to unexport objects on system bus after it closes
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] manager: don't try to unexport objects on system bus after it closes
- Date: Tue, 21 May 2013 02:30:51 +0000 (UTC)
commit fe6dd54d7b5300c1b025a95ed189d4222fd1432f
Author: Ray Strode <rstrode redhat com>
Date: Fri May 17 09:35:18 2013 -0400
manager: don't try to unexport objects on system bus after it closes
When the main GDM manager object is finalized, it unexports any
exported DBus ObjectManager objects.
In many cases, the system bus is no longer around by the time the GDM
manager object is finalized. Unexporting an object when the the
bus connection is already closed will make GDBus blow an assertion
(since it's already been implicitly unexported by virtue of being
disconnected).
This commit changes the GDM manager object's finalize method to avoid
explicitly unexporting the objects in the above scenario.
https://bugzilla.gnome.org/show_bug.cgi?id=700523
daemon/gdm-manager.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 6f5364e..ce857cf 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1163,12 +1163,14 @@ gdm_manager_finalize (GObject *object)
G_CALLBACK (on_display_removed),
manager);
- gdm_display_store_foreach (manager->priv->display_store,
- (GdmDisplayStoreFunc)unexport_display,
- manager);
- gdm_display_store_clear (manager->priv->display_store);
+ if (!g_dbus_connection_is_closed (manager->priv->connection)) {
+ gdm_display_store_foreach (manager->priv->display_store,
+ (GdmDisplayStoreFunc)unexport_display,
+ manager);
+ g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager));
+ }
- g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (manager));
+ gdm_display_store_clear (manager->priv->display_store);
g_dbus_object_manager_server_set_connection (manager->priv->object_manager, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]