diff --git a/dmtree/tr181/firewall.c b/dmtree/tr181/firewall.c index 88e6b5a8..d6daef25 100644 --- a/dmtree/tr181/firewall.c +++ b/dmtree/tr181/firewall.c @@ -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; diff --git a/dmtree/tr181/upnp.c b/dmtree/tr181/upnp.c index 1c50a659..3f8bfe13 100644 --- a/dmtree/tr181/upnp.c +++ b/dmtree/tr181/upnp.c @@ -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;