mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-02-13 19:39:06 +01:00
get the new acs url from provisioning.iup.urlcwmp when dhcp_discovery is enabled and the session is retried
This commit is contained in:
parent
bbbf0b2f76
commit
07aa2cba24
2 changed files with 12 additions and 1 deletions
12
http.c
12
http.c
|
|
@ -50,10 +50,20 @@ static CURL *curl;
|
|||
int
|
||||
http_client_init(struct cwmp *cwmp)
|
||||
{
|
||||
char *dhcp_dis;
|
||||
char *acs_var_stat;
|
||||
uci_get_value(UCI_DHCP_DISCOVERY_PATH, &dhcp_dis);
|
||||
#ifdef HTTP_CURL
|
||||
if (asprintf(&http_c.url, "%s",
|
||||
if (dhcp_dis && cwmp->retry_count_session > 0 && strcmp(dhcp_dis, "enable") == 0) {
|
||||
uci_get_value(UCI_DHCP_ACS_URL, &acs_var_stat);
|
||||
if (asprintf(&http_c.url, "%s",
|
||||
acs_var_stat) == -1)
|
||||
return -1;
|
||||
} else {
|
||||
if (asprintf(&http_c.url, "%s",
|
||||
cwmp->conf.acsurl) == -1)
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HTTP_ZSTREAM
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
#define LW_NOTIFICATION_ENABLE "cwmp.lwn.enable"
|
||||
#define LW_NOTIFICATION_HOSTNAME "cwmp.lwn.hostname"
|
||||
#define LW_NOTIFICATION_PORT "cwmp.lwn.port"
|
||||
#define UCI_DHCP_ACS_URL "provisioning.iup.urlcwmp"
|
||||
|
||||
|
||||
enum end_session {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue