Diff between 3b1eab0e62fe8903886932d8e24f34a6d22bba1d and d3046c09ea7dd9d3126d55e6988953d86d31ef2e
Changed Files
| File | Additions | Deletions | Status |
| src/gatt-client.c | +6 | -0 | modified |
Full Patch
diff --git a/src/gatt-client.c b/src/gatt-client.c
index a118870..0eae578 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -344,6 +344,9 @@ static void desc_read_cb(bool success, uint8_t att_ecode,
return;
}
+ if (!op->offset)
+ gatt_db_attribute_reset(desc->attr);
+
gatt_db_attribute_write(desc->attr, 0, value, length, 0, NULL,
write_descriptor_cb, desc);
@@ -773,6 +776,9 @@ static void chrc_read_cb(bool success, uint8_t att_ecode, const uint8_t *value,
return ;
}
+ if (!op->offset)
+ gatt_db_attribute_reset(chrc->attr);
+
gatt_db_attribute_write(chrc->attr, 0, value, length, op->offset, NULL,
write_characteristic_cb, chrc);