Don't call upgrade callbacks for module with no revision defined

This commit is contained in:
Vladimir Ratnikov 2020-07-28 05:52:07 -04:00
parent 9d2102cebf
commit 8b5c77838b
2 changed files with 3 additions and 1 deletions

View file

@ -94,6 +94,7 @@ Expected: July 2020
### Corrected Bugs ### Corrected Bugs
* Fixed: Don't call upgrade callbacks if no revision defined so there's no way to determine right way 'from' and 'to'
* Fixed: [Need to add the possibility to use anchors around patterns #51](https://github.com/clicon/cligen/issues/51): * Fixed: [Need to add the possibility to use anchors around patterns #51](https://github.com/clicon/cligen/issues/51):
* Dont escape `$` if it is last in a regexp in translation from XML to POSIX. * Dont escape `$` if it is last in a regexp in translation from XML to POSIX.
* Fixed `CLICON_YANG_UNKNOWN_ANYDATA` for config and state data. This feature introduced in 4.5 didnt really work. * Fixed `CLICON_YANG_UNKNOWN_ANYDATA` for config and state data. This feature introduced in 4.5 didnt really work.

View file

@ -412,7 +412,8 @@ mod_ns_upgrade(clicon_handle h,
if ((ymod = yang_find_module_by_namespace(yspec, ns)) == NULL) if ((ymod = yang_find_module_by_namespace(yspec, ns)) == NULL)
goto fail; goto fail;
if ((yrev = yang_find(ymod, Y_REVISION, NULL)) == NULL) if ((yrev = yang_find(ymod, Y_REVISION, NULL)) == NULL)
goto fail; retval = 1;
goto done;
if (ys_parse_date_arg(yang_argument_get(yrev), &to) < 0) if (ys_parse_date_arg(yang_argument_get(yrev), &to) < 0)
goto done; goto done;
} }