Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for autoconfig renew looping & set_channel #130

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/agent/em_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ em_t *em_agent_t::find_em_for_msg_type(unsigned char *data, unsigned int len, em
dm_easy_mesh_t::macbytes_to_string(ruid, mac_str1);
if ((em = (em_t *)hash_map_get(m_em_map, mac_str1)) != NULL) {
printf("%s:%d: Found existing radio:%s\n", __func__, __LINE__, mac_str1);
em->set_state(em_state_ctrl_wsc_m1_pending);
} else {
return NULL;
}
Expand Down
4 changes: 4 additions & 0 deletions src/ctrl/dm_easy_mesh_ctrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ int dm_easy_mesh_ctrl_t::analyze_config_renew(em_bus_event_t *evt, em_cmd_t *pcm

evt_param->u.args.num_args = 1;
strncpy(evt_param->u.args.args[0], radio_str, strlen(radio_str) + 1);
memcpy(&dm.m_radio[0].m_radio_info.id.mac, params->radio, sizeof(mac_address_t));
pcmd[num] = new em_cmd_cfg_renew_t(em_service_type_ctrl, evt->params, dm);
tmp = pcmd[num];
num++;
Expand Down Expand Up @@ -675,6 +676,9 @@ int dm_easy_mesh_ctrl_t::analyze_set_channel(em_bus_event_t *evt, em_cmd_t *pcmd

pdm = m_data_model_list.get_first_dm();
while (pdm != NULL) {
for (i = 0; i < dm.get_num_op_class(); i++) {
memcpy(&dm.m_op_class[i].m_op_class_info.id.ruid, pdm->get_device_info()->id.mac, sizeof(mac_addr_t));
}
pdm->set_channels_list(dm.m_op_class, dm.get_num_op_class());

db_cfg_type = pdm->get_db_cfg_type();
Expand Down
4 changes: 0 additions & 4 deletions src/em/config/em_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3006,10 +3006,6 @@ void em_configuration_t::process_agent_state()
handle_state_autoconfig_rsp_pending();
break;

case em_state_ctrl_wsc_m1_pending:
handle_state_wsc_m1_pending();
break;

case em_state_agent_wsc_m2_pending:
handle_state_wsc_m2_pending();
break;
Expand Down
4 changes: 3 additions & 1 deletion src/orch/em_orch_ctrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,11 @@ unsigned int em_orch_ctrl_t::build_candidates(em_cmd_t *pcmd)
break;

case em_cmd_type_cfg_renew:
if (em->is_cfg_renew_candidate()) {
dm = pcmd->get_data_model();
if (memcmp(em->get_radio_interface_mac(), dm->m_radio[0].m_radio_info.id.mac, sizeof(mac_address_t)) == 0) {
queue_push(pcmd->m_em_candidates, em);
count++;
break;
}
break;

Expand Down
Loading