Message ID | 20240731102321.700398-1-alexander.ganslandt@axis.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 720e8ec9760b8d8bfb565e535bd311bbc8273a76 |
Headers | show |
Series | [BlueZ] client/gatt: Set handle before calling print functions | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
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 |
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=875408 ---Test result--- Test Summary: CheckPatch PASS 0.46 seconds GitLint PASS 0.32 seconds BuildEll PASS 24.66 seconds BluezMake PASS 1623.04 seconds MakeCheck PASS 13.71 seconds MakeDistcheck PASS 176.88 seconds CheckValgrind PASS 251.74 seconds CheckSmatch PASS 355.19 seconds bluezmakeextell PASS 119.72 seconds IncrementalBuild PASS 1420.21 seconds ScanBuild PASS 1051.12 seconds --- Regards, Linux Bluetooth
Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Wed, 31 Jul 2024 12:23:21 +0200 you wrote: > The print functions (print_service, print_chrc and print_desc) all print > the handle, but the handle is never set in the struct object. This > results in the handle always printing as 0x0000. Set the handle before > calling the print function. > --- > client/gatt.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) Here is the summary with links: - [BlueZ] client/gatt: Set handle before calling print functions https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=720e8ec9760b You are awesome, thank you!
diff --git a/client/gatt.c b/client/gatt.c index e1d2b545d..4dac88590 100644 --- a/client/gatt.c +++ b/client/gatt.c @@ -165,6 +165,7 @@ static void print_service_proxy(GDBusProxy *proxy, const char *description) DBusMessageIter iter; const char *uuid; dbus_bool_t primary; + uint16_t handle; if (g_dbus_proxy_get_property(proxy, "UUID", &iter) == FALSE) return; @@ -176,10 +177,16 @@ static void print_service_proxy(GDBusProxy *proxy, const char *description) dbus_message_iter_get_basic(&iter, &primary); + if (g_dbus_proxy_get_property(proxy, "Handle", &iter) == FALSE) + return; + + dbus_message_iter_get_basic(&iter, &handle); + memset(&service, 0, sizeof(service)); service.path = (char *) g_dbus_proxy_get_path(proxy); service.uuid = (char *) uuid; service.primary = primary; + service.handle = handle; print_service(&service, description); } @@ -253,15 +260,22 @@ static void print_characteristic(GDBusProxy *proxy, const char *description) struct chrc chrc; DBusMessageIter iter; const char *uuid; + uint16_t handle; if (g_dbus_proxy_get_property(proxy, "UUID", &iter) == FALSE) return; dbus_message_iter_get_basic(&iter, &uuid); + if (g_dbus_proxy_get_property(proxy, "Handle", &iter) == FALSE) + return; + + dbus_message_iter_get_basic(&iter, &handle); + memset(&chrc, 0, sizeof(chrc)); chrc.path = (char *) g_dbus_proxy_get_path(proxy); chrc.uuid = (char *) uuid; + chrc.handle = handle; print_chrc(&chrc, description); } @@ -347,15 +361,22 @@ static void print_descriptor(GDBusProxy *proxy, const char *description) struct desc desc; DBusMessageIter iter; const char *uuid; + uint16_t handle; if (g_dbus_proxy_get_property(proxy, "UUID", &iter) == FALSE) return; dbus_message_iter_get_basic(&iter, &uuid); + if (g_dbus_proxy_get_property(proxy, "Handle", &iter) == FALSE) + return; + + dbus_message_iter_get_basic(&iter, &handle); + memset(&desc, 0, sizeof(desc)); desc.path = (char *) g_dbus_proxy_get_path(proxy); desc.uuid = (char *) uuid; + desc.handle = handle; print_desc(&desc, description); }