diff mbox series

[BlueZ,v2] media: set default value for BAP endpoint Vendor field

Message ID 26d36cc8d645773b6795a18355631134bf2bd074.1675281104.git.pav@iki.fi (mailing list archive)
State Accepted
Commit 67395a3b357d492089e0606e7a5168e48651703d
Headers show
Series [BlueZ,v2] media: set default value for BAP endpoint Vendor field | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 12: B2 Line has trailing whitespace: " "
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Pauli Virtanen Feb. 1, 2023, 7:51 p.m. UTC
The "Vendor" field is optional, and should have an initialized valid
default value.

It has the default values in register_endpoint, but not in
app_register_endpoint, so make the latter match the former.
---

Notes:
    v2: Let's not use C99 initializers.
    
    The uninitialized values cause Pipewire media endpoint registrations to
    fail, and this makes it work again. Its BAP media endpoints do not have
    the Vendor field, given that they use LC3, so the struct in
    app_register_endpoint ends up containing random garbage.  The resulting
    invalid codec/cid/vid value combination is rejected by
    bt_bap_add_vendor_pac.

 profiles/audio/media.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

bluez.test.bot@gmail.com Feb. 1, 2023, 9:14 p.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=717874

---Test result---

Test Summary:
CheckPatch                    PASS      1.01 seconds
GitLint                       FAIL      0.67 seconds
BuildEll                      PASS      28.44 seconds
BluezMake                     PASS      860.68 seconds
MakeCheck                     PASS      11.86 seconds
MakeDistcheck                 PASS      148.18 seconds
CheckValgrind                 PASS      244.17 seconds
CheckSmatch                   PASS      325.68 seconds
bluezmakeextell               PASS      97.45 seconds
IncrementalBuild              PASS      703.79 seconds
ScanBuild                     PASS      1001.52 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v2] media: set default value for BAP endpoint Vendor field

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
12: B2 Line has trailing whitespace: "    "


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Feb. 1, 2023, 9: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 Wed,  1 Feb 2023 19:51:47 +0000 you wrote:
> The "Vendor" field is optional, and should have an initialized valid
> default value.
> 
> It has the default values in register_endpoint, but not in
> app_register_endpoint, so make the latter match the former.
> ---
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2] media: set default value for BAP endpoint Vendor field
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=67395a3b357d

You are awesome, thank you!
diff mbox series

Patch

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index d96367454..8a2afd04c 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -2583,6 +2583,8 @@  static void app_register_endpoint(void *data, void *user_data)
 
 	dbus_message_iter_get_basic(&iter, &codec);
 
+	memset(&vendor, 0, sizeof(vendor));
+
 	if (g_dbus_proxy_get_property(proxy, "Vendor", &iter)) {
 		if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
 			goto fail;