Fixed a problem with some netconf error messages caused restconf daemon to exit due to no XML encoding

This commit is contained in:
Olof hagsand 2019-06-12 18:15:44 +02:00
parent de15b2bf80
commit 98cc62eace
7 changed files with 68 additions and 29 deletions

View file

@ -2212,7 +2212,9 @@ xml_spec_populate_rpc(clicon_handle h,
if (yrpc){
xml_spec_set(x, yrpc);
if ((yi = yang_find(yrpc, Y_INPUT, NULL)) != NULL){
/* kludge rpc -> input XXX THIS HIDES AN ERROR IN xml_spec_populate */
/* xml_spec_populate need to have parent with yang spec for
* recursive population to work. Therefore, assign input yang
* to rpc level although not 100% intuitive */
xml_spec_set(x, yi);
if (xml_apply(x, CX_ELMNT, xml_spec_populate, yspec) < 0)
goto done;