Skip to content

Commit

Permalink
Merge pull request #2403 from ssievert42/ble_resolve_address
Browse files Browse the repository at this point in the history
ble: use peer manager function for iterating over known peers
  • Loading branch information
gfwilliams authored Aug 15, 2023
2 parents 2c7d11f + 83c5f52 commit 1e8fedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion targets/nrf5x/bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3643,7 +3643,7 @@ JsVar *jsble_resolveAddress(JsVar *address) {
memset(&peer_data_bonding, 0, sizeof(peer_data_bonding));
// iterate over all known peers
pm_peer_id_t peer_id = PM_PEER_ID_INVALID;
while ((peer_id = pdb_next_peer_id_get(peer_id)) != PM_PEER_ID_INVALID) {
while ((peer_id = pm_next_peer_id_get(peer_id)) != PM_PEER_ID_INVALID) {
if (pm_peer_data_bonding_load(peer_id, &peer_data_bonding) == NRF_SUCCESS){
// address match?
if (im_address_resolve(&addr, &peer_data_bonding.peer_ble_id.id_info)) {
Expand Down

0 comments on commit 1e8fedb

Please sign in to comment.