Added / to api-path to xpath conversion

This commit is contained in:
Olof hagsand 2020-03-25 22:11:07 +01:00
parent 4e578b77ee
commit 1079fcad47
3 changed files with 3 additions and 1 deletions

View file

@ -124,6 +124,7 @@ clixon_plugin_statedata(clicon_handle h,
goto done;
if (fn(h, nsc, xpath, x) < 0)
goto fail; /* Dont quit here on user callbacks */
/* if x contains no data, then continue? */
#if 1
if (debug)
clicon_log_xml(LOG_DEBUG, x, "%s STATE:", __FUNCTION__);

View file

@ -54,7 +54,7 @@
/*
* Types
* Add error here, but must also add an entry in EV variable.
* Add error category here, but must also add an entry in EV variable.
*/
enum clicon_err{
/* 0 means error not set) */

View file

@ -637,6 +637,7 @@ api_path2xpath_cvv(cvec *api_path,
char *namespace = NULL;
cvec *nsc = NULL;
cprintf(xpath, "/");
/* Initialize namespace context */
if ((nsc = xml_nsctx_init(NULL, NULL)) == NULL)
goto done;