Diff between 59c07d9d2ab55d28eea8d7ad8806dccf1c57861a and 82d49f9d66a821d360e0f0c28a905e9cba1f961e

Changed Files

File Additions Deletions Status
src/gatt-client.c +2 -2 modified

Full Patch

diff --git a/src/gatt-client.c b/src/gatt-client.c
index a488821..f6ef810 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -347,7 +347,7 @@ static void desc_read_cb(bool success, uint8_t att_ecode,
 	if (!op->offset)
 		gatt_db_attribute_reset(desc->attr);
 
-	gatt_db_attribute_write(desc->attr, 0, value, length, 0, NULL,
+	gatt_db_attribute_write(desc->attr, op->offset, value, length, 0, NULL,
 						write_descriptor_cb, desc);
 
 	/*
@@ -779,7 +779,7 @@ static void chrc_read_cb(bool success, uint8_t att_ecode, const uint8_t *value,
 	if (!op->offset)
 		gatt_db_attribute_reset(chrc->attr);
 
-	gatt_db_attribute_write(chrc->attr, 0, value, length, op->offset, NULL,
+	gatt_db_attribute_write(chrc->attr, op->offset, value, length, 0, NULL,
 						write_characteristic_cb, chrc);
 
 	/*