mirror of
https://github.com/armink/FlashDB
synced 2025-03-28 21:13:13 +00:00
interrupt iteraotor when read_section_info failed
This commit is contained in:
parent
deae3d1d3f
commit
2bdab72efa
@ -837,10 +837,10 @@ static void sector_iterator(fdb_kvdb_t db, kv_sec_info_t sector, fdb_sector_stor
|
||||
sec_addr = db_oldest_addr(db);
|
||||
do {
|
||||
traversed_len += db_sec_size(db);
|
||||
read_sector_info(db, sec_addr, sector, false);
|
||||
if (FDB_NO_ERR != read_sector_info(db, sec_addr, sector, false))return;
|
||||
if (status == FDB_SECTOR_STORE_UNUSED || status == sector->status.store) {
|
||||
if (traversal_kv) {
|
||||
read_sector_info(db, sec_addr, sector, true);
|
||||
if (FDB_NO_ERR != read_sector_info(db, sec_addr, sector, true))return;
|
||||
}
|
||||
/* iterator is interrupted when callback return true */
|
||||
if (callback && callback(sector, arg1, arg2)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user