diff mbox series

[BlueZ,v4,1/3] shared/vcp: Fix the crash observed with VOCS

Message ID 20230725134742.51651-2-nitin.jadhav@nxp.com
State Superseded
Headers show
Series Fix the crash observed with VOCS | expand

Commit Message

Nitin Jadhav July 25, 2023, 1:47 p.m. UTC
Root cause
- There are two types of database- Remote and Local (rdb and ldb).
- In client mode currently the code was written to access ldb.

Fix
- Correcting it, to access rdb has resolved the problem in VOCS.
- Same correction is done for VCS.

Reported-by: Pauli Virtanen <pav@iki.fi>
---
 src/shared/vcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com July 25, 2023, 4:13 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=769321

---Test result---

Test Summary:
CheckPatch                    PASS      1.20 seconds
GitLint                       PASS      0.76 seconds
BuildEll                      PASS      35.83 seconds
BluezMake                     PASS      1251.83 seconds
MakeCheck                     PASS      13.06 seconds
MakeDistcheck                 PASS      212.03 seconds
CheckValgrind                 PASS      334.16 seconds
CheckSmatch                   PASS      465.97 seconds
bluezmakeextell               PASS      138.70 seconds
IncrementalBuild              PASS      3262.86 seconds
ScanBuild                     PASS      1483.32 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/shared/vcp.c b/src/shared/vcp.c
index 74bd01729..314618664 100644
--- a/src/shared/vcp.c
+++ b/src/shared/vcp.c
@@ -1719,10 +1719,10 @@  bool bt_vcp_attach(struct bt_vcp *vcp, struct bt_gatt_client *client)
 		return false;
 
 	bt_uuid16_create(&uuid, VCS_UUID);
-	gatt_db_foreach_service(vcp->ldb->db, &uuid, foreach_vcs_service, vcp);
+	gatt_db_foreach_service(vcp->rdb->db, &uuid, foreach_vcs_service, vcp);
 
 	bt_uuid16_create(&uuid, VOL_OFFSET_CS_UUID);
-	gatt_db_foreach_service(vcp->ldb->db, &uuid, foreach_vocs_service, vcp);
+	gatt_db_foreach_service(vcp->rdb->db, &uuid, foreach_vocs_service, vcp);
 
 	return true;
 }