summaryrefslogtreecommitdiff
path: root/lib/yang.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-10 17:35:21 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-03-10 20:51:55 +0200
commitfb912e09004fde46ad4447c6d563b195ee159088 (patch)
treed6d0da0dd4f5a1ffe9b56cb6d74d41cb39dade70 /lib/yang.c
parent5c30b2e21205ecc60615b633dbc4714bae70a676 (diff)
lib: fix initialization of northbound nodes
When actions and notification are defined as descendants of other nodes, they are not getting initialized, because the iterator skips them. Fix the iterator to include them when traversing the schema. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/yang.c')
-rw-r--r--lib/yang.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/yang.c b/lib/yang.c
index 03044fc29e..d71cb2f498 100644
--- a/lib/yang.c
+++ b/lib/yang.c
@@ -199,6 +199,16 @@ next:
if (ret == YANG_ITER_STOP)
return ret;
}
+ LY_LIST_FOR ((const struct lysc_node *)lysc_node_notifs(snode), child) {
+ ret = yang_snodes_iterate_subtree(child, module, cb, flags, arg);
+ if (ret == YANG_ITER_STOP)
+ return ret;
+ }
+ LY_LIST_FOR ((const struct lysc_node *)lysc_node_actions(snode), child) {
+ ret = yang_snodes_iterate_subtree(child, module, cb, flags, arg);
+ if (ret == YANG_ITER_STOP)
+ return ret;
+ }
return ret;
}