Update enabled parameter handling

This commit is contained in:
vdutta 2022-06-09 17:55:27 +05:30
parent db708d1050
commit 2963a32f96
2 changed files with 2 additions and 2 deletions

View file

@ -928,7 +928,7 @@ static int set_rule_enable(char *refparam, struct dmctx *ctx, void *data, char *
break;
case VALUESET:
string_to_bool(value, &b);
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "enabled", b ? "" : "0");
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "enabled", b ? "1" : "0");
break;
}
return 0;

View file

@ -394,7 +394,7 @@ static int set_UPnPDevice_Enable(char *refparam, struct dmctx *ctx, void *data,
return 0;
case VALUESET:
string_to_bool(value, &b);
dmuci_set_value("upnpd", "config", "enabled", b ? "" : "0");
dmuci_set_value("upnpd", "config", "enabled", b ? "1" : "0");
return 0;
}
return 0;