mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
tr181: Add UCI path option for management server request URL
Add Uci option to specify a path for the connection request URL cwmp.cpe.path Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
This commit is contained in:
parent
efe2ca135b
commit
14e91c87bc
1 changed files with 6 additions and 4 deletions
|
|
@ -181,12 +181,14 @@ static int get_management_server_connection_request_url(char *refparam, struct d
|
|||
char *ip, *port, *iface;
|
||||
|
||||
dmuci_get_option_value_string("cwmp", "cpe", "default_wan_interface", &iface);
|
||||
network_get_ipaddr(&ip, iface);
|
||||
network_get_ipaddr(&ip, iface);
|
||||
dmuci_get_option_value_string("cwmp", "cpe", "port", &port);
|
||||
|
||||
if (ip[0] != '\0' && port[0] != '\0') {
|
||||
char buf[64];
|
||||
snprintf(buf, sizeof(buf), "http://%s:%s/", ip, port);
|
||||
*value = dmstrdup(buf); // MEM WILL BE FREED IN DMMEMCLEAN
|
||||
char *path;
|
||||
|
||||
dmuci_get_option_value_string("cwmp", "cpe", "path", &path);
|
||||
dmasprintf(value, "http://%s:%s/%s", ip, port, path ? path : "");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue