Skip to content

Commit dc26b93

Browse files
committed
schema tree BUGFIX connect augment children at the end
When everything else succeeded. Fixes #688
1 parent 29ee446 commit dc26b93

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/tree_schema.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4339,16 +4339,6 @@ apply_aug(struct lys_node_augment *augment, struct unres_schema *unres)
43394339
goto success;
43404340
}
43414341

4342-
/* reconnect augmenting data into the target - add them to the target child list */
4343-
if (augment->target->child) {
4344-
child = augment->target->child->prev;
4345-
child->next = augment->child;
4346-
augment->target->child->prev = augment->child->prev;
4347-
augment->child->prev = child;
4348-
} else {
4349-
augment->target->child = augment->child;
4350-
}
4351-
43524342
/* inherit config information from actual parent */
43534343
for (parent = augment->target; parent && !(parent->nodetype & (LYS_NOTIF | LYS_INPUT | LYS_OUTPUT | LYS_RPC)); parent = lys_parent(parent));
43544344
clear_config = (parent) ? 1 : 0;
@@ -4375,6 +4365,16 @@ apply_aug(struct lys_node_augment *augment, struct unres_schema *unres)
43754365
}
43764366
}
43774367

4368+
/* reconnect augmenting data into the target - add them to the target child list */
4369+
if (augment->target->child) {
4370+
child = augment->target->child->prev;
4371+
child->next = augment->child;
4372+
augment->target->child->prev = augment->child->prev;
4373+
augment->child->prev = child;
4374+
} else {
4375+
augment->target->child = augment->child;
4376+
}
4377+
43784378
success:
43794379
/* remove the flag about not applicability */
43804380
augment->flags &= ~LYS_NOTAPPLIED;

0 commit comments

Comments
 (0)