diff mbox series

[BlueZ] media: Register app objects in proxy_added_cb()

Message ID 20230527231458.673167-1-arkadiusz.bokowy@gmail.com
State New
Headers show
Series [BlueZ] media: Register app objects in proxy_added_cb() | expand

Commit Message

Arkadiusz Bokowy May 27, 2023, 11:14 p.m. UTC
The proxy_added_cb() function is called every time a new client is added
to the application object manager. Registering media endpoint and player
in that proxy_added_cb() callback function will allow to register new
endpoints and players not only during the initial RegisterApplication
call, but also during the application lifetime. For instance, this might
allow to dynamically enable/disable support for additional codecs.
---
 profiles/audio/media.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

bluez.test.bot@gmail.com May 28, 2023, 12:57 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=751626

---Test result---

Test Summary:
CheckPatch                    PASS      0.41 seconds
GitLint                       PASS      0.26 seconds
BuildEll                      PASS      34.50 seconds
BluezMake                     PASS      1172.85 seconds
MakeCheck                     PASS      12.91 seconds
MakeDistcheck                 PASS      198.14 seconds
CheckValgrind                 PASS      322.43 seconds
CheckSmatch                   PASS      446.16 seconds
bluezmakeextell               PASS      132.82 seconds
IncrementalBuild              PASS      1016.34 seconds
ScanBuild                     PASS      1429.99 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org June 7, 2023, 7:50 p.m. UTC | #2
Hello:

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

On Sun, 28 May 2023 01:14:58 +0200 you wrote:
> The proxy_added_cb() function is called every time a new client is added
> to the application object manager. Registering media endpoint and player
> in that proxy_added_cb() callback function will allow to register new
> endpoints and players not only during the initial RegisterApplication
> call, but also during the application lifetime. For instance, this might
> allow to dynamically enable/disable support for additional codecs.
> 
> [...]

Here is the summary with links:
  - [BlueZ] media: Register app objects in proxy_added_cb()
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=08d62744ce17

You are awesome, thank you!
diff mbox series

Patch

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 6ce668e31..4c42b7817 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -2821,9 +2821,6 @@  static void client_ready_cb(GDBusClient *client, void *user_data)
 		goto reply;
 	}
 
-	queue_foreach(app->proxies, app_register_endpoint, app);
-	queue_foreach(app->proxies, app_register_player, app);
-
 	if (app->err) {
 		if (app->err == -EPROTONOSUPPORT)
 			reply = btd_error_not_supported(app->reg);
@@ -2867,6 +2864,10 @@  static void proxy_added_cb(GDBusProxy *proxy, void *user_data)
 	path = g_dbus_proxy_get_path(proxy);
 
 	DBG("Proxy added: %s, iface: %s", path, iface);
+
+	app_register_endpoint(proxy, app);
+	app_register_player(proxy, app);
+
 }
 
 static bool match_endpoint_by_path(const void *a, const void *b)