Message ID | 20250313205404.534383-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v1] gatt-client: Fix Handle property of descriptors | expand |
diff --git a/src/gatt-client.c b/src/gatt-client.c index da7c16fc14af..3c31a422eaba 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -141,8 +141,8 @@ static bool uuid_cmp(const bt_uuid_t *uuid, uint16_t u16) static gboolean descriptor_get_handle(const GDBusPropertyTable *property, DBusMessageIter *iter, void *data) { - struct service *desc = data; - uint16_t handle = desc->start_handle; + struct descriptor *desc = data; + uint16_t handle = desc->handle; dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, &handle);
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Patch cda5549f2475 ("gatt-client: Add read-only handles to dbus") introduced support for Handle properties to GATT attributes but the function descriptor_get_handle do access the user_pointer as it was a service not a descriptor. Fixes: https://github.com/bluez/bluez/issues/1133 --- src/gatt-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)