sort xml children on parsing

This commit is contained in:
Olof hagsand 2017-12-31 18:25:53 +01:00
parent 9681c91681
commit 19301ae240
5 changed files with 35 additions and 23 deletions

View file

@ -403,7 +403,11 @@ from_client_edit_config(clicon_handle h,
"</rpc-error></rpc-reply>");
goto ok;
}
/* Cant do this earlier since we dont have a yang spec to
* the upper part of the tree, until we get the "config" tree.
*/
if (xml_child_sort && xml_apply0(xc, CX_ELMNT, xml_sort, NULL) < 0)
goto done;
if (xmldb_put(h, target, operation, xc) < 0){
cprintf(cbret, "<rpc-reply><rpc-error>"
"<error-tag>operation-failed</error-tag>"