diff mbox series

[BlueZ] gdbus: Emit InterfacesAdded of parents objects first

Message ID 20220204013620.2465024-1-luiz.dentz@gmail.com (mailing list archive)
State Superseded
Headers show
Series [BlueZ] gdbus: Emit InterfacesAdded of parents objects first | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck success Make Check PASS
tedd_an/makecheckvalgrind success Make Check PASS
tedd_an/makedistcheck success Make Distcheck PASS
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS

Commit Message

Luiz Augusto von Dentz Feb. 4, 2022, 1:36 a.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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

Fixes: https://github.com/bluez/bluez/issues/284
---
 gdbus/object.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

bluez.test.bot@gmail.com Feb. 4, 2022, 3:08 a.m. UTC | #1
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
Marijn Suijten Feb. 4, 2022, 3:39 p.m. UTC | #2
On 2022-02-03 17:36:20, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This makes InterfacesAdded respect the object hierarchy in case its
> parent has pending interfaces to be added.
> 
> Fixes: https://github.com/bluez/bluez/issues/284

https://lore.kernel.org/linux-bluetooth/20211215180527.886481-1-claudio.takahasi@gmail.com/T/#mfb2f320363c6cd086f6e92d5f6ad441b23d540fe
too?  This fixees the issue again, thanks!

> ---
>  gdbus/object.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/gdbus/object.c b/gdbus/object.c
> index 50a8b4ff1..7232c2986 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 chield objects may point to it.

child*

- Marijn

> +	 */
> +	if (data->parent && data->parent->added)
> +		emit_interfaces_added(data->parent);
> +
>  	signal = dbus_message_new_signal(root->path,
>  					DBUS_INTERFACE_OBJECT_MANAGER,
>  					"InterfacesAdded");
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/gdbus/object.c b/gdbus/object.c
index 50a8b4ff1..7232c2986 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 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");