* Proper RFC 6241 Netconf error handling
* New functions added in clixon_netconf_lib.[ch] * Datastore code modified for RFC 6241 * Remaining: validate, generic restconf and netconf code
This commit is contained in:
parent
52e510cfdf
commit
efa72e9e6f
26 changed files with 1196 additions and 475 deletions
|
|
@ -124,6 +124,7 @@ main(int argc, char **argv)
|
|||
cxobj *xt = NULL;
|
||||
int i;
|
||||
char *xpath;
|
||||
cbuf *cbret = NULL;
|
||||
|
||||
/* In the startup, logs to stderr & debug flag set later */
|
||||
clicon_log_init(__PROGRAM__, LOG_INFO, CLICON_LOG_STDERR);
|
||||
|
|
@ -261,7 +262,9 @@ main(int argc, char **argv)
|
|||
goto done;
|
||||
if (xml_rootchild(xt, 0, &xt) < 0)
|
||||
goto done;
|
||||
if (xmldb_put(h, db, op, xt) < 0)
|
||||
if ((cbret = cbuf_new()) == NULL)
|
||||
goto done;
|
||||
if (xmldb_put(h, db, op, xt, cbret) < 0)
|
||||
goto done;
|
||||
}
|
||||
else if (strcmp(cmd, "copy")==0){
|
||||
|
|
@ -325,6 +328,8 @@ main(int argc, char **argv)
|
|||
if (xmldb_plugin_unload(h) < 0)
|
||||
goto done;
|
||||
done:
|
||||
if (cbret)
|
||||
cbuf_free(cbret);
|
||||
if (xt)
|
||||
xml_free(xt);
|
||||
if (h)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue