Diff between 816d40fc5ea18a363ba342c7597e6f3f80d5eb32 and 0cced81cef7449b49ca78bacb9ee1bc2fdaf3e36

Changed Files

File Additions Deletions Status
src/shared/gatt-db.c +4 -1 modified

Full Patch

diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index af1cde9..c24b643 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -837,7 +837,10 @@ const bt_uuid_t *gatt_db_attribute_get_type(struct gatt_db_attribute *attrib)
 
 uint16_t gatt_db_attribute_get_handle(struct gatt_db_attribute *attrib)
 {
-	return 0;
+	if (!attrib)
+		return 0;
+
+	return attrib->handle;
 }
 
 bool gatt_db_attribute_get_service_uuid(struct gatt_db_attribute *attrib,