1
1
/*
2
- * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
2
+ * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
@@ -57,7 +57,8 @@ bt_status_t btc_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
57
57
58
58
// delete config info
59
59
if (btc_config_remove_section (remove_section )) {
60
- BTC_TRACE_WARNING ("exceeded the maximum nubmer of bonded devices, delete the first device info : %s\n" , remove_section );
60
+ BTC_TRACE_WARNING ("exceeded the maximum nubmer of bonded devices, delete the first device info : %02x:%02x:%02x:%02x:%02x:%02x" ,
61
+ bd_addr .address [0 ], bd_addr .address [1 ], bd_addr .address [2 ], bd_addr .address [3 ], bd_addr .address [4 ], bd_addr .address [5 ]);
61
62
}
62
63
}
63
64
@@ -131,6 +132,7 @@ static bt_status_t btc_in_fetch_bonded_devices(int add)
131
132
bt_status_t status = BT_STATUS_FAIL ;
132
133
uint16_t dev_cnt = 0 ;
133
134
const btc_config_section_iter_t * remove_iter = NULL ;
135
+ bt_bdaddr_t bd_addr ;
134
136
135
137
btc_config_lock ();
136
138
for (const btc_config_section_iter_t * iter = btc_config_section_begin (); iter != btc_config_section_end (); iter = btc_config_section_next (iter )) {
@@ -157,14 +159,16 @@ static bt_status_t btc_in_fetch_bonded_devices(int add)
157
159
remove_iter = iter ;
158
160
while (remove_iter != btc_config_section_end ()) {
159
161
const char * remove_section = btc_config_section_name (remove_iter );
162
+ string_to_bdaddr (remove_section , & bd_addr );
160
163
if (!string_is_bdaddr (remove_section )) {
161
164
remove_iter = btc_config_section_next (remove_iter );
162
165
continue ;
163
166
}
164
167
remove_iter = btc_config_section_next (remove_iter );
165
168
/* delete config info */
166
169
if (btc_config_remove_section (remove_section )) {
167
- BTC_TRACE_WARNING ("exceeded the maximum number of bonded devices, delete the exceed device info : %s" , remove_section );
170
+ BTC_TRACE_WARNING ("exceeded the maximum number of bonded devices, delete the exceed device info : %02x:%02x:%02x:%02x:%02x:%02x" ,
171
+ bd_addr .address [0 ], bd_addr .address [1 ], bd_addr .address [2 ], bd_addr .address [3 ], bd_addr .address [4 ], bd_addr .address [5 ]);
168
172
}
169
173
}
170
174
/* write into nvs */
0 commit comments