Skip to content

Commit

Permalink
parser BUGFIX unresolve duplicated identifier in grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
PavolVican committed Jul 12, 2016
1 parent efcc39e commit 55abd33
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -3539,7 +3539,7 @@ resolve_uses(struct lys_node_uses *uses, struct unres_schema *unres)
{
struct ly_ctx *ctx;
struct lys_node *node = NULL, *next, *iter;
struct lys_node *node_aux, *parent;
struct lys_node *node_aux, *parent, *tmp;
struct lys_refine *rfn;
struct lys_restr *must, **old_must;
int i, j, rc, parent_flags;
Expand Down Expand Up @@ -3571,6 +3571,12 @@ resolve_uses(struct lys_node_uses *uses, struct unres_schema *unres)
LOGVAL(LYE_SPEC, LY_VLOG_LYS, uses, "Copying data from grouping failed.");
return -1;
}
/* test the name of siblings */
LY_TREE_FOR((uses->parent) ? uses->parent->child : lys_main_module(uses->module)->data, tmp) {
if ((struct lys_node_uses*)tmp != uses && tmp->name == node_aux->name) {
return -1;
}
}
}
ctx = uses->module->ctx;

Expand Down

0 comments on commit 55abd33

Please sign in to comment.