Diff between 29133a1203486d2e83b434c6fd54b2fcaa4146b1 and 3508e02e9adc2ccde2df4a660217b57def834432
Changed Files
| File | Additions | Deletions | Status |
| src/gatt-database.c | +2 | -2 | modified |
Full Patch
diff --git a/src/gatt-database.c b/src/gatt-database.c
index 5e83ce1..e876141 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -495,7 +495,7 @@ static void gatt_ccc_read_cb(struct gatt_db_attribute *attrib,
goto done;
}
- len -= offset;
+ len = 2 - offset;
value = len ? &ccc->value[offset] : NULL;
done:
@@ -517,7 +517,7 @@ static void gatt_ccc_write_cb(struct gatt_db_attribute *attrib,
handle = gatt_db_attribute_get_handle(attrib);
- DBG("CCC read called for handle: 0x%04x", handle);
+ DBG("CCC write called for handle: 0x%04x", handle);
if (!value || len != 2) {
ecode = BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;