11/*
2- * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
@@ -40,7 +40,7 @@ bt_status_t btc_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
4040 bdaddr_to_string (remote_bd_addr , bdstr , sizeof (bdstr ));
4141
4242 /* device not in bond list and exceed the maximum number of bonded devices, delete the inactive bonded device */
43- if (btc_storage_get_num_all_bond_devices () >= BTM_SEC_MAX_DEVICE_RECORDS && !btc_config_has_section (bdstr )) {
43+ if (btc_storage_get_num_all_bond_devices () >= BTM_SEC_MAX_BONDS && !btc_config_has_section (bdstr )) {
4444 const btc_config_section_iter_t * iter = btc_config_section_begin ();
4545 const btc_config_section_iter_t * remove_iter = iter ;
4646 /* find the first device(the last node) */
@@ -57,7 +57,7 @@ bt_status_t btc_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
5757
5858 // delete config info
5959 if (btc_config_remove_section (remove_section )) {
60- BTC_TRACE_WARNING ("exceeded the maximum nubmer of bonded devices, delete the first device info : %02x:%02x:%02x:%02x:%02x:%02x" ,
60+ BTC_TRACE_WARNING ("exceeded the maximum number of bonded devices, delete the first device info : %02x:%02x:%02x:%02x:%02x:%02x" ,
6161 bd_addr .address [0 ], bd_addr .address [1 ], bd_addr .address [2 ], bd_addr .address [3 ], bd_addr .address [4 ], bd_addr .address [5 ]);
6262 }
6363 }
@@ -141,8 +141,8 @@ static bt_status_t btc_in_fetch_bonded_devices(int add)
141141 continue ;
142142 }
143143 dev_cnt ++ ;
144- /* if the number of device stored in nvs not exceed to BTM_SEC_MAX_DEVICE_RECORDS , load it */
145- if (dev_cnt <= BTM_SEC_MAX_DEVICE_RECORDS ) {
144+ /* if the number of device stored in nvs not exceed to BTM_SEC_MAX_BONDS , load it */
145+ if (dev_cnt <= BTM_SEC_MAX_BONDS ) {
146146 if (btc_config_exist (name , BTC_STORAGE_LINK_KEY_TYPE_STR ) && btc_config_exist (name , BTC_STORAGE_PIN_LENGTH_STR ) &&
147147 btc_config_exist (name , BTC_STORAGE_SC_SUPPORT ) && btc_config_exist (name , BTC_STORAGE_LINK_KEY_STR )) {
148148 /* load bt device */
0 commit comments