diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-02-03 17:29:25 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-02-04 13:13:28 -0800 |
commit | 19448b9cb852b8c38f15362e185e6b18d634859d (patch) | |
tree | dfd36d1507d6f2aa64856977d69db60d970a2a50 /gdbus | |
parent | 3f72b45150a50c99f344bbcfb4e19e360b85555f (diff) | |
download | bluez-19448b9cb852b8c38f15362e185e6b18d634859d.tar.gz |
gdbus: Emit InterfacesAdded of parents objects first
This makes InterfacesAdded respect the object hierarchy in case its
parent has pending interfaces to be added.
Fixes: https://github.com/bluez/bluez/issues/272
Fixes: https://github.com/bluez/bluez/issues/284
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534857
Fixes: https://bugs.archlinux.org/task/57464
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/object.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c index 50a8b4ff1..f7c8c2be5 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -551,6 +551,12 @@ static void emit_interfaces_added(struct generic_data *data) if (root == NULL || data == root) return; + /* Emit InterfacesAdded on the parent first so it appears first on the + * bus as child objects may point to it. + */ + if (data->parent && data->parent->added) + emit_interfaces_added(data->parent); + signal = dbus_message_new_signal(root->path, DBUS_INTERFACE_OBJECT_MANAGER, "InterfacesAdded"); |