* C-API: Added xpath_first_localonly() as an xpath function that skips prefix and namespace checks.
* Added experimental code for optizing XPath search using binary search. * Enable with XPATH_LIST_OPTIMIZE * Changed `clicon_rpc_generate_error(msg, xerr)` to `clicon_rpc_generate_error(xerr, msg, arg)`
This commit is contained in:
parent
ab46ce9820
commit
7ad16bd84b
56 changed files with 602 additions and 227 deletions
|
|
@ -47,7 +47,6 @@
|
|||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
/* cligen */
|
||||
#include <cligen/cligen.h>
|
||||
|
|
@ -1360,13 +1359,13 @@ netconf_err2cb(cxobj *xerr,
|
|||
int retval = -1;
|
||||
cxobj *x;
|
||||
|
||||
if ((x=xpath_first(xerr, NULL, "error-type"))!=NULL)
|
||||
if ((x=xpath_first(xerr, NULL, "//error-type"))!=NULL)
|
||||
cprintf(cberr, "%s ", xml_body(x));
|
||||
if ((x=xpath_first(xerr, NULL, "error-tag"))!=NULL)
|
||||
if ((x=xpath_first(xerr, NULL, "//error-tag"))!=NULL)
|
||||
cprintf(cberr, "%s ", xml_body(x));
|
||||
if ((x=xpath_first(xerr, NULL, "error-message"))!=NULL)
|
||||
if ((x=xpath_first(xerr, NULL, "//error-message"))!=NULL)
|
||||
cprintf(cberr, "%s ", xml_body(x));
|
||||
if ((x=xpath_first(xerr, NULL, "error-info"))!=NULL)
|
||||
if ((x=xpath_first(xerr, NULL, "//error-info"))!=NULL)
|
||||
clicon_xml2cbuf(cberr, xml_child_i(x,0), 0, 0, -1);
|
||||
retval = 0;
|
||||
return retval;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue