Skip to content

Commit

Permalink
Save the correct key on peer_secs
Browse files Browse the repository at this point in the history
This fixes a bond issue
  • Loading branch information
copercini authored and ESPAbhinav committed Feb 14, 2024
1 parent fd31133 commit e769fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nimble/host/store/config/src/ble_store_nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e769fcc

Please sign in to comment.