mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-01 17:35:33 +01:00
Fix SetSSID enable parameter
This commit is contained in:
parent
6cecc5f91d
commit
4bb1e2420d
1 changed files with 10 additions and 8 deletions
|
|
@ -666,7 +666,7 @@ static int browseWiFiDataElementsNetworkSSIDInst(struct dmctx *dmctx, DMNODE *pa
|
|||
synchronize_specific_config_sections_with_dmmap("mapcontroller", "ap", "dmmap_mapcontroller", &dup_list);
|
||||
list_for_each_entry(p, &dup_list, list) {
|
||||
char *type = NULL;
|
||||
char *disabled = NULL;
|
||||
char *enabled = NULL;
|
||||
bool b = false;
|
||||
|
||||
dmuci_get_value_by_section_string(p->config_section, "type", &type);
|
||||
|
|
@ -674,10 +674,12 @@ static int browseWiFiDataElementsNetworkSSIDInst(struct dmctx *dmctx, DMNODE *pa
|
|||
continue;
|
||||
|
||||
// skip the disabled fronthaul interfaces
|
||||
dmuci_get_value_by_section_string(p->config_section, "disabled", &disabled);
|
||||
string_to_bool(disabled, &b);
|
||||
if (b == true)
|
||||
continue;
|
||||
dmuci_get_value_by_section_string(p->config_section, "enabled", &enabled);
|
||||
if (DM_STRLEN(enabled)) {
|
||||
string_to_bool(enabled, &b);
|
||||
if (b == false)
|
||||
continue;
|
||||
}
|
||||
|
||||
inst = handle_instance(dmctx, parent_node, p->dmmap_section, "wifi_da_ssid_instance", "wifi_da_ssid_alias");
|
||||
|
||||
|
|
@ -5988,7 +5990,7 @@ static int operate_WiFiDataElementsNetwork_SetSSID(char *refparam, struct dmctx
|
|||
dmuci_get_value_by_section_string(s, "ssid", &curr_ssid);
|
||||
dmuci_get_value_by_section_string(s, "band", &curr_band);
|
||||
if (DM_STRCMP(curr_ssid, ssid) == 0 && DM_STRNCMP(curr_band, band, 1) == 0) {
|
||||
dmuci_set_value_by_section(s, "disabled", "0");
|
||||
dmuci_set_value_by_section(s, "enabled", "1");
|
||||
if (*key) dmuci_set_value_by_section(s, "key", key);
|
||||
ssid_exist = true;
|
||||
break;
|
||||
|
|
@ -6001,7 +6003,7 @@ static int operate_WiFiDataElementsNetwork_SetSSID(char *refparam, struct dmctx
|
|||
dmuci_set_value_by_section(s, "key", key);
|
||||
dmuci_set_value_by_section(s, "type", "fronthaul");
|
||||
dmuci_set_value_by_section(s, "band", (*band == '5') ? "5" : "2");
|
||||
dmuci_set_value_by_section(s, "disabled", "0");
|
||||
dmuci_set_value_by_section(s, "enabled", "1");
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -6010,7 +6012,7 @@ static int operate_WiFiDataElementsNetwork_SetSSID(char *refparam, struct dmctx
|
|||
dmuci_get_value_by_section_string(s, "ssid", &curr_ssid);
|
||||
dmuci_get_value_by_section_string(s, "band", &curr_band);
|
||||
if (DM_STRCMP(curr_ssid, ssid) == 0 && DM_STRNCMP(curr_band, band, 1) == 0) {
|
||||
dmuci_set_value_by_section(s, "disabled", "1");
|
||||
dmuci_set_value_by_section(s, "enabled", "0");
|
||||
ssid_exist = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue