From b782453feec8a4f1ff574030d11ba7ff9640cf6e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 3 May 2011 18:49:06 +0100 Subject: [PATCH 3/4] dbus_g_connection_unregister_g_object: only unregister from @connection Previously, we unregistered the object from all connections, if it was present on more than one. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32087 --- dbus/dbus-gobject.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 74bc204..d28f61f 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -2478,7 +2478,8 @@ object_registration_object_died (gpointer user_data, GObject *dead) * @connection: the D-BUS connection * @object: the object * - * Removes @object from the bus. Properties, methods, and signals + * Removes @object from any object paths at which it is exported on + * @connection. Properties, methods, and signals * of the object can no longer be accessed remotely. */ void @@ -2497,12 +2498,15 @@ dbus_g_connection_unregister_g_object (DBusGConnection *connection, for (iter = registrations; iter; iter = iter->next) { ObjectRegistration *o = iter->data; + + if (o->connection != connection) + continue; + dbus_connection_unregister_object_path (DBUS_CONNECTION_FROM_G_CONNECTION (o->connection), o->object_path); } g_slist_free (registrations); - g_assert (g_object_get_data (object, "dbus_glib_object_registrations") == NULL); } /** -- 1.7.4.4