From 9064f3623f7702e9609ba9dc0f47917cf2151180 Mon Sep 17 00:00:00 2001 From: behanansaju <140800890+behanansaju@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:52:08 +0000 Subject: [PATCH] Bug fix for remote agent radio details not being populated in get_bss & get_radio --- src/dm/dm_easy_mesh_list.cpp | 18 +++++++++--------- src/dm/dm_radio_list.cpp | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/dm/dm_easy_mesh_list.cpp b/src/dm/dm_easy_mesh_list.cpp index 84cdcaf..7d8d5b4 100644 --- a/src/dm/dm_easy_mesh_list.cpp +++ b/src/dm/dm_easy_mesh_list.cpp @@ -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) { diff --git a/src/dm/dm_radio_list.cpp b/src/dm/dm_radio_list.cpp index 4beffc0..6fb9cba 100644 --- a/src/dm/dm_radio_list.cpp +++ b/src/dm/dm_radio_list.cpp @@ -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; }