Skip to content

Commit 21b90ce

Browse files
committed
resolve BUGFIX identityref value can be specified with module name
In that case we want to keep it in the compared value as well. Fixes sysrepo/sysrepo#926
1 parent 0fc888e commit 21b90ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/resolve.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,8 +2580,8 @@ resolve_partial_json_data_nodeid(const char *nodeid, const char *llist_value, st
25802580
}
25812581
}
25822582

2583-
/* make value canonical */
2584-
if ((llist->value_type & LY_TYPE_IDENT)
2583+
/* make value canonical (remove module name prefix) unless it was specified with it */
2584+
if (!strchr(llist_value, ':') && (llist->value_type & LY_TYPE_IDENT)
25852585
&& !strncmp(llist->value_str, lyd_node_module(sibling)->name, strlen(lyd_node_module(sibling)->name))
25862586
&& (llist->value_str[strlen(lyd_node_module(sibling)->name)] == ':')) {
25872587
data_val = llist->value_str + strlen(lyd_node_module(sibling)->name) + 1;

0 commit comments

Comments
 (0)