mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-01-28 01:27:16 +01:00
fix wlan get status
This commit is contained in:
parent
f3c8d37be0
commit
6c0a5084bc
1 changed files with 5 additions and 4 deletions
|
|
@ -1594,13 +1594,14 @@ int set_wlan_enable(char *refparam, struct dmctx *ctx, int action, char *value)
|
|||
|
||||
int get_wlan_status (char *refparam, struct dmctx *ctx, char **value)
|
||||
{
|
||||
char *tmp;
|
||||
struct ldwlanargs *wlanargs = (struct ldwlanargs *)ctx->args;
|
||||
|
||||
dmuci_get_value_by_section_string(wlanargs->lwlansection, "disabled", value);
|
||||
if ((*value)[0] == '\0' || (*value)[0] == '0')
|
||||
dmuci_get_value_by_section_string(wlanargs->device_section, "disabled", &tmp);
|
||||
if (tmp[0] == '0' || tmp[0] == '\0')
|
||||
*value = "Up";
|
||||
else
|
||||
*value = "Disabled";
|
||||
else if (tmp[0] == '1')
|
||||
*value = "Disabled";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue