From 2963a32f962bf7b92cd216b75a9855a15d1db5a4 Mon Sep 17 00:00:00 2001 From: vdutta Date: Thu, 9 Jun 2022 17:55:27 +0530 Subject: [PATCH] Update enabled parameter handling --- dmtree/tr181/firewall.c | 2 +- dmtree/tr181/upnp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;