public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails
@ 2022-09-25 16:31 Haochen Tong
  2022-09-25 17:35 ` [BlueZ] " bluez.test.bot
  2022-09-26 18:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Haochen Tong @ 2022-09-25 16:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Haochen Tong

The `owner' string, passed as user data, is freed if the player fails
registration, but the object path still exists. Upon program exiting,
the lingering path will be enumerated and the attached user data will be
freed again.
---
 tools/mpris-proxy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/mpris-proxy.c b/tools/mpris-proxy.c
index 3779b6887..e5fc91fdb 100644
--- a/tools/mpris-proxy.c
+++ b/tools/mpris-proxy.c
@@ -480,6 +480,7 @@ static void add_player(DBusConnection *conn, const char *name,
 	reply = dbus_connection_send_with_reply_and_block(sys, msg, -1, &err);
 	if (!reply) {
 		fprintf(stderr, "Can't register player\n");
+		dbus_connection_unregister_object_path(sys, path);
 		free(owner);
 		if (dbus_error_is_set(&err)) {
 			fprintf(stderr, "%s\n", err.message);
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] tools/mpris-proxy: unregister object path if player registration fails
  2022-09-25 16:31 [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails Haochen Tong
@ 2022-09-25 17:35 ` bluez.test.bot
  2022-09-26 18:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-09-25 17:35 UTC (permalink / raw)
  To: linux-bluetooth, i

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

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=680261

---Test result---

Test Summary:
CheckPatch                    PASS      1.24 seconds
GitLint                       PASS      0.80 seconds
Prep - Setup ELL              PASS      26.66 seconds
Build - Prep                  PASS      0.70 seconds
Build - Configure             PASS      8.31 seconds
Build - Make                  PASS      761.28 seconds
Make Check                    PASS      11.50 seconds
Make Check w/Valgrind         PASS      290.45 seconds
Make Distcheck                PASS      242.20 seconds
Build w/ext ELL - Configure   PASS      8.36 seconds
Build w/ext ELL - Make        PASS      84.93 seconds
Incremental Build w/ patches  PASS      0.00 seconds
Scan Build                    PASS      493.69 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails
  2022-09-25 16:31 [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails Haochen Tong
  2022-09-25 17:35 ` [BlueZ] " bluez.test.bot
@ 2022-09-26 18:00 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-09-26 18:00 UTC (permalink / raw)
  To: Haochen Tong; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 26 Sep 2022 00:31:39 +0800 you wrote:
> The `owner' string, passed as user data, is freed if the player fails
> registration, but the object path still exists. Upon program exiting,
> the lingering path will be enumerated and the attached user data will be
> freed again.
> ---
>  tools/mpris-proxy.c | 1 +
>  1 file changed, 1 insertion(+)

Here is the summary with links:
  - [BlueZ] tools/mpris-proxy: unregister object path if player registration fails
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7738e9ac416b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-26 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-25 16:31 [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails Haochen Tong
2022-09-25 17:35 ` [BlueZ] " bluez.test.bot
2022-09-26 18:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox