mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
3269653b94
nvs: fix Page::findItem and Storage::findItem regression When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found. Incidentally, Storage::findItem reused itemIndex when starting search at next page. So, - if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index, - first page has a few empty items at the end (but is marked full), - next search looked up the item on the second page, - index of the item on the second page was less than the cached index on the first page, then the search would fail because cached starting index was reused. This change fixes both sides of the problem: - Page::findItem shouldn't modify itemIndex argument if item is not found - Storage::findItem should not reuse itemIndex between pages Two tests have been added. ref. TW8406 See merge request !171 |
||
---|---|---|
.. | ||
bootloader | ||
bt | ||
driver | ||
esp32 | ||
esptool_py | ||
expat | ||
freertos | ||
idf_test | ||
json | ||
log | ||
lwip | ||
mbedtls | ||
newlib | ||
nghttp | ||
nvs_flash | ||
openssl | ||
partition_table | ||
spi_flash | ||
tcpip_adapter | ||
vfs | ||
wpa_supplicant | ||
xtensa-debug-module |