Skip to contentSkip to conversation

gdbus: Emit InterfacesAdded of parents objects first

PATCH Superseded Luiz Augusto von Dentz 3 participants 3 messages Feb 4, 2022 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 gdbus: Emit InterfacesAdded of parents objects first

From: Luiz Augusto von Dentz <[email protected]>

This makes InterfacesAdded respect the object hierarchy in case its parent has pending interfaces to be added.

---
 gdbus/object.c | 6 ++++++
 1 file changed, 6 insertions(+)
gdbus/object.c +6 -0
index 50a8b4ff1..7232c2986 100644
@@ -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 chield 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");
Signature · 1 line
2.34.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=611174

---Test result---

Test Summary:

CheckPatch                    PASS      1.44 seconds
GitLint                       PASS      1.06 seconds
Prep - Setup ELL              PASS      53.53 seconds
Build - Prep                  PASS      0.81 seconds
Build - Configure             PASS      10.72 seconds
Build - Make                  PASS      1499.10 seconds
Make Check                    PASS      13.01 seconds
Make Check w/Valgrind         PASS      539.50 seconds
Make Distcheck                PASS      285.04 seconds
Build w/ext ELL - Configure   PASS      10.78 seconds
Build w/ext ELL - Make        PASS      1464.28 seconds
Incremental Build with patchesPASS      0.00 seconds

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
Quoted 6 lines · Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

This makes InterfacesAdded respect the object hierarchy in case its parent has pending interfaces to be added.

https://lore.kernel.org/linux-bluetooth/[email protected]/T/#mfb2f320363c6cd086f6e92d5f6ad441b23d540fe
too? This fixees the issue again, thanks!

Quoted 9 lines
---
 gdbus/object.c | 6 ++++++
 1 file changed, 6 insertions(+)
gdbus/object.c +0 -0
index 50a8b4ff1..7232c2986 100644

gdbus/object.c static void emit_interfaces_added(struct generic_data *data) · line 555

Quoted 5 lines
gdbus/object.c +2 -0
@@ -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 chield objects may point to it.

child*

- Marijn

Quoted 10 lines
gdbus/object.c +4 -0
+	 */
+	if (data->parent && data->parent->added)
+		emit_interfaces_added(data->parent);
+
 	signal = dbus_message_new_signal(root->path,
 					DBUS_INTERFACE_OBJECT_MANAGER,
 					"InterfacesAdded");
Signature · 1 line
2.34.1