summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2023-12-04 18:53:50 +0000
committerFelix Fietkau2023-12-04 18:53:53 +0000
commitdc24a1010d7be693337ed3aa32dc8b3caef42a5d (patch)
tree747040a5eb547775b78d7e9a2902b187aa376aa6
parentb613879cb049123dd9dc68d5e6aef60141ebe483 (diff)
downloadudebug-dc24a1010d7be693337ed3aa32dc8b3caef42a5d.tar.gz
lib: fix handling global enable flag
don't override it for individual rings Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 5c5cd7e..0bb287e 100644
--- a/lib.c
+++ b/lib.c
@@ -120,7 +120,7 @@ void udebug_ubus_apply_config(struct udebug *ud, struct udebug_ubus_ring *rings,
blobmsg_parse_attr(policy, __CFG_ATTR_MAX, tb, data);
- if ((cur = tb[CFG_ATTR_ENABLE]) != NULL)
+ if (enabled && (cur = tb[CFG_ATTR_ENABLE]) != NULL)
cur_enabled = !!atoi(blobmsg_get_string(cur));
if ((cur = tb[CFG_ATTR_SIZE]) != NULL)