Fixed: [Backend can not read datastore with container named config #147](https://github.com/clicon/clixon/issues/147)

This commit is contained in:
Olof hagsand 2021-03-13 17:15:00 +01:00
parent 07d196dfd0
commit 9087694b58
9 changed files with 51 additions and 61 deletions

View file

@ -508,25 +508,16 @@ _xml_parse(const char *str,
failed++;
break;
case YB_MODULE_NEXT:
if ((ret = xml_bind_yang(x, YB_MODULE, yspec, xerr)) < 0)
goto done;
if (ret == 0)
failed++;
break;
case YB_MODULE:
/* xt:<top> nospec
* x: <a> <-- populate from modules
*/
#ifdef XMLDB_CONFIG_HACK
if (
// xml_flag(x, XML_FLAG_TOP)
strcmp(xml_name(x), DATASTORE_TOP_SYMBOL) == 0
|| strcmp(xml_name(x), NETCONF_OUTPUT_DATA) == 0
){
/* xt:<top> nospec
* x: <config>
* <a> <-- populate from modules
*/
if ((ret = xml_bind_yang(x, YB_MODULE, yspec, xerr)) < 0)
goto done;
}
else
#endif
if ((ret = xml_bind_yang0(x, YB_MODULE, yspec, xerr)) < 0)
goto done;
if (ret == 0)