context UPDATE new flag for enabling features of imports
Allow enabling all features of implemented
imports when loading a new module.
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 5f27502..d456467 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -808,6 +808,7 @@
{
LY_ERR ret = LY_SUCCESS, r;
struct lys_module *mod_iter;
+ const char **imp_f, *all_f[] = {"*", NULL};
uint32_t i;
if (mod->implemented) {
@@ -836,7 +837,8 @@
continue;
}
- r = lys_implement(mod, NULL, unres);
+ imp_f = (mod->ctx->flags & LY_CTX_ENABLE_IMP_FEATURES) ? all_f : NULL;
+ r = lys_implement(mod, imp_f, unres);
LY_CHECK_ERR_GOTO(r && (r != LY_ERECOMPILE), ret = r, cleanup);
}
}