From a9fd2162c31aef69335b065b7ed4705640596ab8 Mon Sep 17 00:00:00 2001 From: copercini Date: Mon, 7 Oct 2019 19:42:07 -0300 Subject: [PATCH] Save the correct key on peer_secs This fixes a bond issue --- nimble/host/store/config/src/ble_store_nvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/host/store/config/src/ble_store_nvs.c b/nimble/host/store/config/src/ble_store_nvs.c index 98a78ff85..b38e4cfd7 100644 --- a/nimble/host/store/config/src/ble_store_nvs.c +++ b/nimble/host/store/config/src/ble_store_nvs.c @@ -398,7 +398,7 @@ int ble_store_config_persist_peer_secs(void) /* NVS db count less than RAM count, write operation */ ESP_LOGD(TAG, "Persisting peer sec value in NVS..."); - val.sec = ble_store_config_our_secs[ble_store_config_num_peer_secs - 1]; + val.sec = ble_store_config_peer_secs[ble_store_config_num_peer_secs - 1]; return ble_store_nvs_write(BLE_STORE_OBJ_TYPE_PEER_SEC, &val); } else if (nvs_count > ble_store_config_num_peer_secs) { /* NVS db count more than RAM count, delete operation */