From dc24a1010d7be693337ed3aa32dc8b3caef42a5d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 4 Dec 2023 19:53:50 +0100 Subject: [PATCH] lib: fix handling global enable flag don't override it for individual rings Signed-off-by: Felix Fietkau --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2