Call ys_populate_feature from if_feature_check
In some cases, the feature won't be populated yet, and therefore, we will consider this feature as disabled. Fixes #429
This commit is contained in:
parent
8732d118dd
commit
b13917b2ac
6 changed files with 15 additions and 5 deletions
|
|
@ -64,6 +64,7 @@
|
|||
* @param[in] accept Sub-parse rule to accept
|
||||
* @param[in] mainfile Name of main parse file
|
||||
* @param[in] linenum Line number context in mainfile (assume parse module of ys)
|
||||
* @param[in] h Clixon handle
|
||||
* @param[out] enabled 0: Disabled, 1: Enabled (if present)
|
||||
* @retval 0 OK
|
||||
* @retval -1 Error
|
||||
|
|
@ -74,7 +75,8 @@ yang_subparse(char *str,
|
|||
enum yang_sub_parse_accept accept,
|
||||
const char *mainfile,
|
||||
int linenum,
|
||||
int *enabled)
|
||||
int *enabled,
|
||||
clicon_handle h)
|
||||
{
|
||||
int retval = -1;
|
||||
clixon_yang_sub_parse_yacc ife = {0,};
|
||||
|
|
@ -86,6 +88,7 @@ yang_subparse(char *str,
|
|||
ife.if_ys = ys; /* Used as trigger to check if enabled */
|
||||
ife.if_accept = accept;
|
||||
ife.if_mainfile = mainfile;
|
||||
ife.h = h;
|
||||
if (clixon_yang_sub_parsel_init(&ife) < 0)
|
||||
goto done;
|
||||
if (clixon_yang_sub_parseparse(&ife) != 0) { /* yacc returns 1 on error */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue