gatt-database: Fix error registering characteristic with Handle 0x0000
Luiz Augusto von Dentz
maintainerPATCH 1/1 gatt-database: Fix error registering characteristic with Handle 0x0000
From: Luiz Augusto von Dentz <[email protected]>
Registering a characteristic with handle 0x0000 means that the application wants a handles to be auto allocated but requires to be informed of what values they end up in the database.
--- src/gatt-database.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
src/gatt-database.c +6 -3
@@ -3334,12 +3334,12 @@ static void database_add_includes(struct external_service *service)static bool database_add_chrc (struct external_service *service,struct external_chrc *chrc) { -uint16_t handle; +uint16_t handle =0 , value_handle;bt_uuid_t uuid;char str[MAX_LEN_UUID_STR ];const struct queue_entry *entry; -if (!parse_handle (chrc->proxy, &handle)) { +if (!parse_handle (chrc->proxy, &value_handle)) {error ("Failed to read \"Handle\" property of characteristic" );return false; }
@@ -3354,8 +3354,11 @@ static bool database_add_chrc(struct external_service *service,return false; } +if (value_handle) + handle = value_handle -1 ; + chrc->attrib =gatt_db_service_insert_characteristic (service->attrib, - handle -1 , handle, &uuid, + handle, value_handle, &uuid, chrc->perm, chrc->props, chrc_read_cb, chrc_write_cb, chrc);
Signature · 1 line
2.44.0
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=850263
---Test result---
Test Summary:
CheckPatch PASS 0.38 seconds GitLint FAIL 0.46 seconds BuildEll PASS 24.61 seconds BluezMake PASS 1723.27 seconds MakeCheck PASS 13.51 seconds MakeDistcheck PASS 177.39 seconds CheckValgrind PASS 246.78 seconds CheckSmatch PASS 350.84 seconds bluezmakeextell PASS 118.94 seconds IncrementalBuild PASS 1495.92 seconds ScanBuild PASS 1007.77 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1] gatt-database: Fix error registering characteristic with Handle 0x0000
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
1: T1 Title exceeds max length (81>80): "[BlueZ,v1] gatt-database: Fix error registering characteristic with Handle 0x0000"
---
Regards,
Linux Bluetooth
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 9 lines · On Fri, 3 May 2024 10:52:38 -0400 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
Registering a characteristic with handle
0x0000means that the application wants a handles to be auto allocated but requires to be informed of what values they end up in the database.[...]
Here is the summary with links:
- [BlueZ,v1] gatt-database: Fix error registering characteristic with Handle 0x0000
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f34cc1da5081
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html