mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Disable dhcp on-boarding once connected
This commit is contained in:
parent
31bed647ea
commit
505d3d63e0
1 changed files with 14 additions and 1 deletions
|
|
@ -155,10 +155,23 @@ int cwmp_schedule_rpc()
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
||||||
CWMP_LOG(INFO, "Get the %sResponse message from the ACS", rpc_acs_methods[rpc_acs->type].name);
|
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))
|
if (rpc_acs_methods[rpc_acs->type].parse_response(rpc_acs))
|
||||||
goto retry;
|
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;
|
ilist = ilist->prev;
|
||||||
if (rpc_acs_methods[rpc_acs->type].extra_clean != NULL)
|
if (rpc_acs_methods[rpc_acs->type].extra_clean != NULL)
|
||||||
rpc_acs_methods[rpc_acs->type].extra_clean(rpc_acs);
|
rpc_acs_methods[rpc_acs->type].extra_clean(rpc_acs);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue