GDBusObjectManagerServer: Use correct object path in export_uniquely() method
authorMatthew Barnes <mbarnes@redhat.com>
Mon, 19 Sep 2011 20:45:05 +0000 (16:45 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 19 Sep 2011 20:45:05 +0000 (16:45 -0400)
commitb1c08ca41981da9ad62841b1a0cb7095ccc111f4
tree29124a7184e6e754393ce16f2ecde6cd3667247b
parentfe27bf003764e453cd15cab67e8a99fcda84db1d
GDBusObjectManagerServer: Use correct object path in export_uniquely() method

In registration_data_export_interface(), the object_path is obtained using:

object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (data->object));

But when exporting an object uniquely, the object_path is not assigned
to the GDBusObject until after all the interfaces are exported.
Therefore, registration_data_export_interface() is trying to export
the interface on the non-unique object path, which can lead to
run-time errors if an object already exists on that path.

Instead, registration_data_export_interface() should be passed the
object_path explicitly, as is done in
g_dbus_object_manager_server_export_unlocked().

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusobjectmanagerserver.c