mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Rename 'keep_settings' to 'fw_upgrade_keep_settings'
This commit is contained in:
parent
5c1970e571
commit
e5ed4c3c89
6 changed files with 8 additions and 8 deletions
|
|
@ -427,7 +427,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td_row_odd"><div class="td_row_odd">keep_settings</div></td>
|
<td class="td_row_odd"><div class="td_row_odd">fw_upgrade_keep_settings</div></td>
|
||||||
<td class="td_row_odd"><div class="td_row_odd">boolean</div></td>
|
<td class="td_row_odd"><div class="td_row_odd">boolean</div></td>
|
||||||
<td class="td_row_odd"><div class="td_row_odd">no</div></td>
|
<td class="td_row_odd"><div class="td_row_odd">no</div></td>
|
||||||
<td class="td_row_odd"><div class="td_row_odd">1</div></td>
|
<td class="td_row_odd"><div class="td_row_odd">1</div></td>
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@
|
||||||
"description": "If set to 1, it forces the connectivity over v4 IP address."
|
"description": "If set to 1, it forces the connectivity over v4 IP address."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "keep_settings",
|
"name": "fw_upgrade_keep_settings",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"required": "no",
|
"required": "no",
|
||||||
"default": "1",
|
"default": "1",
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ typedef struct config {
|
||||||
bool http_disable_100continue;
|
bool http_disable_100continue;
|
||||||
int cr_timeout;
|
int cr_timeout;
|
||||||
bool force_ipv4;
|
bool force_ipv4;
|
||||||
bool keep_settings;
|
bool fw_upgrade_keep_settings;
|
||||||
} config;
|
} config;
|
||||||
|
|
||||||
struct deviceid {
|
struct deviceid {
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ static void config_get_cpe_elements(struct uci_section *s)
|
||||||
[UCI_CPE_JSON_FORCED_INFORM_FILE] = { .name = "forced_inform_json", .type = UCI_TYPE_STRING },
|
[UCI_CPE_JSON_FORCED_INFORM_FILE] = { .name = "forced_inform_json", .type = UCI_TYPE_STRING },
|
||||||
[UCI_CPE_CON_REQ_TIMEOUT] = { .name = "cr_timeout", .type = UCI_TYPE_STRING },
|
[UCI_CPE_CON_REQ_TIMEOUT] = { .name = "cr_timeout", .type = UCI_TYPE_STRING },
|
||||||
[UCI_CPE_FORCE_IPV4] = { .name = "force_ipv4", .type = UCI_TYPE_STRING },
|
[UCI_CPE_FORCE_IPV4] = { .name = "force_ipv4", .type = UCI_TYPE_STRING },
|
||||||
[UCI_CPE_KEEP_SETTINGS] = { .name = "keep_settings", .type = UCI_TYPE_STRING }
|
[UCI_CPE_KEEP_SETTINGS] = { .name = "fw_upgrade_keep_settings", .type = UCI_TYPE_STRING }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct uci_option *cpe_tb[__MAX_NUM_UCI_CPE_ATTRS];
|
struct uci_option *cpe_tb[__MAX_NUM_UCI_CPE_ATTRS];
|
||||||
|
|
@ -189,8 +189,8 @@ static void config_get_cpe_elements(struct uci_section *s)
|
||||||
cwmp_main->conf.force_ipv4 = uci_str_to_bool(get_value_from_uci_option(cpe_tb[UCI_CPE_FORCE_IPV4]));
|
cwmp_main->conf.force_ipv4 = uci_str_to_bool(get_value_from_uci_option(cpe_tb[UCI_CPE_FORCE_IPV4]));
|
||||||
CWMP_LOG(DEBUG, "CWMP CONFIG - cpe force ipv4 enable: %d", cwmp_main->conf.force_ipv4);
|
CWMP_LOG(DEBUG, "CWMP CONFIG - cpe force ipv4 enable: %d", cwmp_main->conf.force_ipv4);
|
||||||
|
|
||||||
cwmp_main->conf.keep_settings = cpe_tb[UCI_CPE_KEEP_SETTINGS] ? uci_str_to_bool(get_value_from_uci_option(cpe_tb[UCI_CPE_KEEP_SETTINGS])) : true;
|
cwmp_main->conf.fw_upgrade_keep_settings = cpe_tb[UCI_CPE_KEEP_SETTINGS] ? uci_str_to_bool(get_value_from_uci_option(cpe_tb[UCI_CPE_KEEP_SETTINGS])) : true;
|
||||||
CWMP_LOG(DEBUG, "CWMP CONFIG - cpe keep settings enable: %d", cwmp_main->conf.keep_settings);
|
CWMP_LOG(DEBUG, "CWMP CONFIG - cpe keep settings enable: %d", cwmp_main->conf.fw_upgrade_keep_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void config_get_acs_elements(struct uci_section *s)
|
static void config_get_acs_elements(struct uci_section *s)
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ int cwmp_apply_firmware()
|
||||||
struct blob_buf b = { 0 };
|
struct blob_buf b = { 0 };
|
||||||
CWMP_MEMSET(&b, 0, sizeof(struct blob_buf));
|
CWMP_MEMSET(&b, 0, sizeof(struct blob_buf));
|
||||||
blob_buf_init(&b, 0);
|
blob_buf_init(&b, 0);
|
||||||
blobmsg_add_u8(&b, "keep", cwmp_main->conf.keep_settings);
|
blobmsg_add_u8(&b, "keep", cwmp_main->conf.fw_upgrade_keep_settings);
|
||||||
|
|
||||||
CWMP_LOG(INFO, "Apply downloaded image ...");
|
CWMP_LOG(INFO, "Apply downloaded image ...");
|
||||||
e = icwmp_ubus_invoke("rpc-sys", "upgrade_start", b.head, NULL, NULL);
|
e = icwmp_ubus_invoke("rpc-sys", "upgrade_start", b.head, NULL, NULL);
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ config cpe 'cpe'
|
||||||
option exec_download '0'
|
option exec_download '0'
|
||||||
option periodic_notify_enable '1'
|
option periodic_notify_enable '1'
|
||||||
option periodic_notify_interval '10'
|
option periodic_notify_interval '10'
|
||||||
option keep_settings '1'
|
option fw_upgrade_keep_settings '1'
|
||||||
|
|
||||||
config lwn 'lwn'
|
config lwn 'lwn'
|
||||||
option enable '1'
|
option enable '1'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue