Skip to content

Commit

Permalink
ESP32: Use GetPartitionLabelByNamespace in ESP32Config::ConfigValueEx…
Browse files Browse the repository at this point in the history
…ists() (#30143)
  • Loading branch information
wqx6 authored and pull[bot] committed Dec 5, 2023
1 parent fe58a0c commit 9d4e320
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/ESP32/ESP32Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ bool ESP32Config::ConfigValueExists(Key key)
{
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
nvs_iterator_t iterator = NULL;
esp_err_t err = nvs_entry_find(NVS_DEFAULT_PART_NAME, key.Namespace, NVS_TYPE_ANY, &iterator);
esp_err_t err = nvs_entry_find(GetPartitionLabelByNamespace(key.Namespace), key.Namespace, NVS_TYPE_ANY, &iterator);
for (; iterator && err == ESP_OK; err = nvs_entry_next(&iterator))
#else
nvs_iterator_t iterator = nvs_entry_find(NVS_DEFAULT_PART_NAME, key.Namespace, NVS_TYPE_ANY);
nvs_iterator_t iterator = nvs_entry_find(GetPartitionLabelByNamespace(key.Namespace), key.Namespace, NVS_TYPE_ANY);
for (; iterator; iterator = nvs_entry_next(iterator))
#endif
{
Expand Down

0 comments on commit 9d4e320

Please sign in to comment.