Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] shared/vcp: Fix duplicate VCS registration in bt_vcp_add_db
@ 2026-06-09 18:13 Simon Mikuda
  2026-06-09 19:32 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-06-09 18:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

bt_vcp_add_db() called vcp_db_new() unconditionally, registering a
second VCS instance when bt_vcp_new() (e.g. a remote client session)
had already created a vdb for the same gatt_db. Guard the db as
bt_tmap_add_db()/bt_gmap_add_db() do, since VCS permits only one
instance per device.

Fixes PTS test VCS/SR/SGGIT/SER/BV-01-C.
---
 src/shared/vcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/vcp.c b/src/shared/vcp.c
index c7f74956e..f05684cfb 100644
--- a/src/shared/vcp.c
+++ b/src/shared/vcp.c
@@ -1939,6 +1939,9 @@ static struct bt_vcp_db *vcp_get_db(struct gatt_db *db)
 
 void bt_vcp_add_db(struct gatt_db *db)
 {
+	if (!db || queue_find(vcp_db, vcp_db_match, db))
+		return;
+
 	vcp_db_new(db);
 }
 
-- 
2.43.0


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

* RE: [BlueZ] shared/vcp: Fix duplicate VCS registration in bt_vcp_add_db
  2026-06-09 18:13 [PATCH BlueZ] shared/vcp: Fix duplicate VCS registration in bt_vcp_add_db Simon Mikuda
@ 2026-06-09 19:32 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-06-09 19:32 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 989 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=1108772

---Test result---

Test Summary:
CheckPatch                    PASS      0.27 seconds
GitLint                       PASS      0.19 seconds
BuildEll                      PASS      20.02 seconds
BluezMake                     PASS      641.79 seconds
MakeCheck                     PASS      0.94 seconds
MakeDistcheck                 PASS      244.57 seconds
CheckValgrind                 PASS      220.97 seconds
CheckSmatch                   PASS      345.87 seconds
bluezmakeextell               PASS      181.21 seconds
IncrementalBuild              PASS      645.43 seconds
ScanBuild                     PASS      1023.19 seconds



https://github.com/bluez/bluez/pull/2205

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-06-09 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 18:13 [PATCH BlueZ] shared/vcp: Fix duplicate VCS registration in bt_vcp_add_db Simon Mikuda
2026-06-09 19:32 ` [BlueZ] " bluez.test.bot

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