Disable dhcp on-boarding once connected

This commit is contained in:
Suvendhu Hansa 2025-09-22 11:45:12 +05:30 committed by IOPSYS Dev
parent 31bed647ea
commit 505d3d63e0
No known key found for this signature in database

View file

@ -155,10 +155,23 @@ int cwmp_schedule_rpc()
goto retry;
CWMP_LOG(INFO, "Get the %sResponse message from the ACS", rpc_acs_methods[rpc_acs->type].name);
if (rpc_acs_methods[rpc_acs->type].parse_response)
if (rpc_acs_methods[rpc_acs->type].parse_response) {
if (rpc_acs_methods[rpc_acs->type].parse_response(rpc_acs))
goto retry;
if (rpc_acs->type == RPC_ACS_INFORM) {
/* Inform response received from ACS and parsed successfully
* now disable DHCP discovery and set url */
if (cwmp_ctx.conf.dhcp_discovery == true)
set_uci_path_value(NULL, "cwmp.acs.dhcp_discovery", "0");
char cur_url[BUF_SIZE_2048] = {0};
get_uci_path_value(NULL, "cwmp.acs.url", cur_url, BUF_SIZE_2048);
if (CWMP_STRCMP(cwmp_ctx.conf.acs_url, cur_url) != 0)
set_uci_path_value(NULL, "cwmp.acs.url", cwmp_ctx.conf.acs_url);
}
}
ilist = ilist->prev;
if (rpc_acs_methods[rpc_acs->type].extra_clean != NULL)
rpc_acs_methods[rpc_acs->type].extra_clean(rpc_acs);