yin parser BUGFIX duplicated parsing of augment's common substatements
Augment's substatements description, reference and status were parsed
twice (or tried to be parsed, but the nodes were not there already) -
first on parsing augment and secondly when resolving augment. Instead,
when resolving augment, we only need to inherit config property from
the target node, this cannot be (and is not) done when parsing augment.
diff --git a/src/parser/yin.c b/src/parser/yin.c
index 05b226d..e8799e9 100644
--- a/src/parser/yin.c
+++ b/src/parser/yin.c
@@ -4564,9 +4564,10 @@
yin = (struct lyxml_elem *)aug->child;
- if (read_yin_common(module, aug->target, (struct ly_mnode *)aug, yin, OPT_CONFIG)) {
- return EXIT_FAILURE;
- }
+ /* inherit config information from parent, augment does not have
+ * config property, but we need to keep the information for subelements
+ */
+ aug->flags |= aug->target->flags & LY_NODE_CONFIG_MASK;
LY_TREE_FOR_SAFE(yin->child, next, sub) {
if (!strcmp(sub->name, "container")) {