Changed singnature of ys_real_module and improved error handling
This commit is contained in:
parent
1a2e074539
commit
576533ed82
7 changed files with 52 additions and 29 deletions
|
|
@ -504,6 +504,7 @@ yang_find_module_by_prefix(yang_stmt *ys,
|
|||
clicon_err(OE_YANG, 0, "My yang spec not found");
|
||||
goto done;
|
||||
}
|
||||
/* First try own module */
|
||||
if ((my_ymod = ys_module(ys)) == NULL){
|
||||
clicon_err(OE_YANG, 0, "My yang module not found");
|
||||
goto done;
|
||||
|
|
@ -513,6 +514,7 @@ yang_find_module_by_prefix(yang_stmt *ys,
|
|||
ymod = my_ymod;
|
||||
goto done;
|
||||
}
|
||||
/* If no match, try imported modules */
|
||||
yimport = NULL;
|
||||
while ((yimport = yn_each(my_ymod, yimport)) != NULL) {
|
||||
if (yang_keyword_get(yimport) != Y_IMPORT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue