get-schema BUGFIX correct interpretation of empty version value
if version value is empty, it was'n interpreted as NULL, but as ""
which was recognized as invalid version format, so the error was returned
instead of searching for the latest version of the schema.
@@ -358,6 +358,9 @@ nc_clb_default_get_schema(struct lyd_node *rpc, struct nc_session *UNUSED(sessio
identifier = ((struct lyd_node_leaf_list *)child)->value_str;
} else if (!strcmp(child->schema->name, "version")) {
version = ((struct lyd_node_leaf_list *)child)->value_str;
+ if (version && version[0] == '\0') {
+ version = NULL;
+ }
} else if (!strcmp(child->schema->name, "format")) {
format = ((struct lyd_node_leaf_list *)child)->value_str;
}
