Skip to content

Commit

Permalink
ESP32: Use GetPartitionLabelByNamespace in ESP32Config::ConfigValueEx…
Browse files Browse the repository at this point in the history
…ists() (project-chip#30143)
  • Loading branch information
wqx6 authored Nov 2, 2023
1 parent edfc199 commit a607daa
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 a607daa

Please sign in to comment.