Skip to content

Commit 9693540

Browse files
committed
schema parsers BUGFIX allow actions instantiation in uses-stmt
1 parent 0621404 commit 9693540

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/tree_schema.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,14 +656,14 @@ lys_node_addchild(struct lys_node *parent, struct lys_module *module, struct lys
656656
case LYS_CONTAINER:
657657
case LYS_LIST:
658658
case LYS_GROUPING:
659+
case LYS_USES:
659660
if (!(child->nodetype &
660661
(LYS_ANYDATA | LYS_CHOICE | LYS_CONTAINER | LYS_GROUPING | LYS_LEAF |
661662
LYS_LEAFLIST | LYS_LIST | LYS_USES | LYS_ACTION | LYS_NOTIF))) {
662663
LOGVAL(LYE_INCHILDSTMT, LY_VLOG_LYS, parent, strnodetype(child->nodetype), strnodetype(parent->nodetype));
663664
return EXIT_FAILURE;
664665
}
665666
break;
666-
case LYS_USES:
667667
case LYS_INPUT:
668668
case LYS_OUTPUT:
669669
case LYS_NOTIF:
@@ -2599,6 +2599,7 @@ lys_node_dup_recursion(struct lys_module *module, struct lys_node *parent, const
25992599
grp->tpdf = lys_tpdf_dup(module, lys_parent(node), grp_orig->tpdf, grp->tpdf_size, unres);
26002600
break;
26012601

2602+
case LYS_ACTION:
26022603
case LYS_RPC:
26032604
rpc->tpdf_size = rpc_orig->tpdf_size;
26042605
rpc->tpdf = lys_tpdf_dup(module, lys_parent(node), rpc_orig->tpdf, rpc->tpdf_size, unres);
@@ -2615,6 +2616,7 @@ lys_node_dup_recursion(struct lys_module *module, struct lys_node *parent, const
26152616
ntf->tpdf = lys_tpdf_dup(module, lys_parent(node), ntf_orig->tpdf, ntf->tpdf_size, unres);
26162617
break;
26172618

2619+
26182620
default:
26192621
/* LY_NODE_AUGMENT */
26202622
LOGINT;

0 commit comments

Comments
 (0)