From 3c014184f7e83a6f986a6568b14f0357771d882b Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sat, 5 Dec 2020 17:36:21 +0100 Subject: [PATCH] * Fixed: [ Calling copy-config RPC from restconf #158](https://github.com/clicon/clixon/issues/158) --- CHANGELOG.md | 1 + apps/restconf/restconf_methods_post.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2e81145..2534f737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ Developers may need to change their code ### Corrected Bugs +* Fixed: [ Calling copy-config RPC from restconf #158](https://github.com/clicon/clixon/issues/158) * Fixed: [namespace prefix nc is not supported in full #154](https://github.com/clicon/clixon/issues/154) * edit-config "config" parameter did not work with prefix other than null * Fixed [YANG: key statement in rpc/notification list #148](https://github.com/clicon/clixon/issues/148) diff --git a/apps/restconf/restconf_methods_post.c b/apps/restconf/restconf_methods_post.c index 369c7c26..16964d3e 100644 --- a/apps/restconf/restconf_methods_post.c +++ b/apps/restconf/restconf_methods_post.c @@ -611,11 +611,11 @@ api_operations_post_output(clicon_handle h, cxobj *xok; int isempty; - // clicon_debug(1, "%s", __FUNCTION__); - /* Validate that exactly only tag */ + clicon_debug(1, "%s", __FUNCTION__); + /* Validate that exactly only tag with exactly one element child */ if ((xoutput = xml_child_i_type(xret, 0, CX_ELMNT)) == NULL || strcmp(xml_name(xoutput),"rpc-reply") != 0 || - xml_child_nr_type(xret, CX_ELMNT) != 1){ + xml_child_nr_type(xoutput, CX_ELMNT) != 1){ if (netconf_malformed_message_xml(&xerr, "restconf RPC does not have single input") < 0) goto done; if ((xe = xpath_first(xerr, NULL, "rpc-error")) == NULL){