Skip to content

Commit

Permalink
Bug fix for remote agent radio details not being populated in get_bss…
Browse files Browse the repository at this point in the history
… & get_radio
  • Loading branch information
behanansaju authored and soumyasmunshi committed Dec 13, 2024
1 parent 384f95c commit 0dc0a1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/dm/dm_easy_mesh_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,18 @@ dm_radio_t *dm_easy_mesh_list_t::get_first_radio()
dm_radio_t *radio = NULL;
dm_easy_mesh_t *dm;


dm = (dm_easy_mesh_t *)hash_map_get_first(m_list);
while (dm != NULL) {
dm = (dm_easy_mesh_t *)hash_map_get_first(m_list);
while (dm != NULL) {
//printf("%s:%d: Number of radios:%d\n", __func__, __LINE__, dm->get_num_radios());
if (dm->get_num_radios() > 0) {
radio = dm->get_radio((unsigned int)0);
}
dm = (dm_easy_mesh_t *)hash_map_get_next(m_list, dm);
}
if (dm->get_num_radios() > 0) {
radio = dm->get_radio((unsigned int)0);
break;
}
dm = (dm_easy_mesh_t *)hash_map_get_next(m_list, dm);
}

return radio;
}
}

dm_radio_t *dm_easy_mesh_list_t::get_next_radio(dm_radio_t *radio)
{
Expand Down
1 change: 0 additions & 1 deletion src/dm/dm_radio_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ int dm_radio_list_t::get_config(cJSON *obj_arr, void *parent, em_get_radio_list_
while (pradio != NULL) {
dm_easy_mesh_t::macbytes_to_string(pradio->m_radio_info.id.mac, mac_str);
if (memcmp(dev_mac, pradio->m_radio_info.dev_id, sizeof(mac_address_t)) != 0) {
dm_easy_mesh_t::macbytes_to_string(pradio->m_radio_info.dev_id, mac_str);
pradio = get_next_radio(pradio);
continue;
}
Expand Down

0 comments on commit 0dc0a1c

Please sign in to comment.