validation BUGFIX proper accessible tree for dummy when
Fixes #1840
diff --git a/src/xpath.c b/src/xpath.c
index e45b489..37d1021 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -8679,6 +8679,13 @@
{
const struct lysc_node *op;
+ /* explicit */
+ if (options & LYXP_ACCESS_TREE_ALL) {
+ return LYXP_NODE_ROOT;
+ } else if (options & LYXP_ACCESS_TREE_CONFIG) {
+ return LYXP_NODE_ROOT_CONFIG;
+ }
+
if (options & LYXP_SCNODE_ALL) {
/* schema */
for (op = ctx_scnode; op && !(op->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)); op = op->parent) {}