Skip to content
  • Matthew Barnes's avatar
    GDBusObjectManagerServer: Use correct object path in export_uniquely() method · b1c08ca4
    Matthew Barnes authored
    
    
    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: default avatarDavid Zeuthen <davidz@redhat.com>
    b1c08ca4