fixed a bug that saved cccd data to a different offset after the second time.

This commit is contained in:
ogatatsu committed 2020-10-04 11:10:07 +09:00
1 parent 2316b0f0b9
commit 771b7cf38f
1 file changed
+5
@@ -238,6 +238,11 @@ static void bond_save_cccd_dfr (uint8_t role, uint16_t conn_hdl, ble_gap_addr_t
do_write = false;
BOND_LOG("CCCD matches file %s contents, no need to write", filename);
}
else
{
// restore the position to the state before reading old_data for writing
file.seek(file.size() - (len + 1));
}
}
if (do_write)