From 4ea547ac6f6bdab9a5ca34493dfee0cfacdd786b Mon Sep 17 00:00:00 2001 From: Simon Bauer Date: Sun, 13 Dec 2020 17:04:43 +0100 Subject: [PATCH] Fixed example_reset function The `xmldb_put` is failing due to the `x_spec` field not being set on the xml tree (`xt`) due to no yang spec being passed to the `clixon_xml_parse_string` function. --- example/main/example_backend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/main/example_backend.c b/example/main/example_backend.c index c6a979f9..7423e62a 100644 --- a/example/main/example_backend.c +++ b/example/main/example_backend.c @@ -923,12 +923,15 @@ example_reset(clicon_handle h, cxobj *xt = NULL; int ret; cbuf *cbret = NULL; + yang_stmt *yspec; if (!_reset) goto ok; /* Note not enabled by default */ + + yspec = clicon_dbspec_yang(h); if (clixon_xml_parse_string("" "loex:loopback" - "", YB_NONE, NULL, &xt, NULL) < 0) + "", YB_MODULE, yspec, &xt, NULL) < 0) goto done; /* Replace parent w first child */ if (xml_rootchild(xt, 0, &xt) < 0)