Skip to content

Commit

Permalink
tree schema BUGFIX always use the main context
Browse files Browse the repository at this point in the history
Fixes #2240
  • Loading branch information
michalvasko committed May 21, 2024
1 parent 8010ce4 commit 232456a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tree_schema_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,8 @@ lysp_load_submodules(struct lysp_ctx *pctx, struct lysp_module *pmod, struct ly_
check_data.name = inc->name;
check_data.revision = inc->rev[0] ? inc->rev : NULL;
check_data.submoduleof = PARSER_CUR_PMOD(pctx)->mod->name;
lys_parse_submodule(ctx, in, format, pctx, lysp_load_module_check, &check_data, new_mods, &submod);
lys_parse_submodule(ctx, in, format, pctx->main_ctx, lysp_load_module_check, &check_data, new_mods,
&submod);

/* update inc pointer - parsing another (YANG 1.0) submodule can cause injecting
* submodule's include into main module, where it is missing */
Expand Down

0 comments on commit 232456a

Please sign in to comment.