diff mbox series

[BlueZ,v3,3/3] shared/vcp: Corrected handle size to accommodate included service

Message ID 20230725112126.49656-4-nitin.jadhav@nxp.com
State New
Headers show
Series Fixed the crash observed with VOCS | expand

Commit Message

Nitin Jadhav July 25, 2023, 11:21 a.m. UTC
Fix: As per specs VOCS is secondary services hence it should be included
under a primary service VCS. Current number of handles should be increase
to accommodate the included service.
---
 src/shared/vcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Menzel July 25, 2023, 11:46 a.m. UTC | #1
Dear Nitin,


Thank you for your patch.

Am 25.07.23 um 13:21 schrieb Nitin Jadhav:
> Fix: As per specs VOCS is secondary services hence it should be included

singular: service?

> under a primary service VCS. Current number of handles should be increase

increase*d*

> to accommodate the included service.

I’d always use imperative mood (also in the commit message summary):

Correct handle size to accommodate included service

or

Reserve one more handler in VCS service for VOCS

> ---
>   src/shared/vcp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/shared/vcp.c b/src/shared/vcp.c
> index 0408531b2..263da4c30 100644
> --- a/src/shared/vcp.c
> +++ b/src/shared/vcp.c
> @@ -998,7 +998,7 @@ static struct bt_vcs *vcs_new(struct gatt_db *db, struct bt_vcp_db *vdb)
>   
>   	/* Populate DB with VCS attributes */
>   	bt_uuid16_create(&uuid, VCS_UUID);
> -	vcs->service = gatt_db_add_service(db, &uuid, true, 9);
> +	vcs->service = gatt_db_add_service(db, &uuid, true, 10);
>   	gatt_db_service_add_included(vcs->service, vdb->vocs->service);
>   	gatt_db_service_set_active(vdb->vocs->service, true);
>   


Kind regards,

Paul
diff mbox series

Patch

diff --git a/src/shared/vcp.c b/src/shared/vcp.c
index 0408531b2..263da4c30 100644
--- a/src/shared/vcp.c
+++ b/src/shared/vcp.c
@@ -998,7 +998,7 @@  static struct bt_vcs *vcs_new(struct gatt_db *db, struct bt_vcp_db *vdb)
 
 	/* Populate DB with VCS attributes */
 	bt_uuid16_create(&uuid, VCS_UUID);
-	vcs->service = gatt_db_add_service(db, &uuid, true, 9);
+	vcs->service = gatt_db_add_service(db, &uuid, true, 10);
 	gatt_db_service_add_included(vcs->service, vdb->vocs->service);
 	gatt_db_service_set_active(vdb->vocs->service, true);