- Fixed: More than one unknown/extension in combination with augment

of extension resulted in extension being skipped.
- print yang extension argument in yang-print functions.
This commit is contained in:
Olof hagsand 2022-01-25 15:37:11 +01:00
parent ed2ff88006
commit 504967864d
2 changed files with 8 additions and 3 deletions

View file

@ -36,6 +36,9 @@
## 5.6.0 ## 5.6.0
Expected: March 2022 Expected: March 2022
### Corrected Bugs
* Fixed: More than one unknown/extension in combination with augment of extension resulted in extension being skipped.
## 5.5.0 ## 5.5.0
20 January 2022 20 January 2022

View file

@ -1852,6 +1852,9 @@ yang_print_cbuf(cbuf *cb,
else else
cprintf(cb, " %s", ys->ys_argument); cprintf(cb, " %s", ys->ys_argument);
} }
if (ys->ys_cv){
cprintf(cb, " %s", cv_string_get(ys->ys_cv));
}
if (ys->ys_len){ if (ys->ys_len){
cprintf(cb, " {\n"); cprintf(cb, " {\n");
yang_print_cbuf(cb, ys, marginal+3); yang_print_cbuf(cb, ys, marginal+3);
@ -3777,8 +3780,8 @@ yang_extension_value(yang_stmt *ys,
continue; continue;
if ((ret = yang_find_prefix_by_namespace(ymod, ns, &prefix)) < 0) if ((ret = yang_find_prefix_by_namespace(ymod, ns, &prefix)) < 0)
goto done; goto done;
if (ret == 0) /* not found */ if (ret == 0) /* not found (this may happen in augment and maybe should be treated otherwise) */
goto ok; continue;
cbuf_reset(cb); cbuf_reset(cb);
cprintf(cb, "%s:%s", prefix, name); cprintf(cb, "%s:%s", prefix, name);
if (strcmp(yang_argument_get(yext), cbuf_get(cb)) != 0) if (strcmp(yang_argument_get(yext), cbuf_get(cb)) != 0)
@ -3792,7 +3795,6 @@ yang_extension_value(yang_stmt *ys,
(cv = yang_cv_get(yext)) != NULL) (cv = yang_cv_get(yext)) != NULL)
*value = cv_string_get(cv); *value = cv_string_get(cv);
} }
ok:
retval = 0; retval = 0;
done: done:
if (cb) if (cb)