diff --git a/lib/clixon/clixon_yang.h b/lib/clixon/clixon_yang.h index c9b4ded5..699b0aa5 100644 --- a/lib/clixon/clixon_yang.h +++ b/lib/clixon/clixon_yang.h @@ -201,7 +201,8 @@ typedef struct yang_stmt yang_stmt; * * @param[in] yn yang node * @param[in] arg Argument - * @retval n OK, abort traversal and return to caller with "n" + * @retval 2 Locally abort this subtree, continue with others + * @retval 1 OK, abort traversal and return to caller with "n" * @retval 0 OK, continue with next * @retval -1 Error, abort */ diff --git a/lib/src/clixon_yang.c b/lib/src/clixon_yang.c index d6e3b4ef..f544add3 100644 --- a/lib/src/clixon_yang.c +++ b/lib/src/clixon_yang.c @@ -3403,7 +3403,8 @@ yang_features(clixon_handle h, * @param[in] fn Callback * @param[in] depth Depth argument: where to start. If <=0 call the calling node yn, if 1 start with its children, etc * @param[in] arg Argument - * @retval n OK, aborted at first encounter of first match + * @retval 2 OK, yn was skipped + * @retval 1 OK, aborted at first encounter of first match * @retval 0 OK, all nodes traversed * @retval -1 Error, aborted at first error encounter * @code @@ -3441,7 +3442,9 @@ yang_apply(yang_stmt *yn, ys = yn->ys_stmt[i]; if ((ret = yang_apply(ys, keyword, fn, depth-1, arg)) < 0) goto done; - if (ret > 0){ + if (ret == 2) + continue; + else if (ret > 0){ retval = ret; goto done; } diff --git a/test/test_openconfig.sh b/test/test_openconfig.sh index 850007c9..1dafb72e 100755 --- a/test/test_openconfig.sh +++ b/test/test_openconfig.sh @@ -63,8 +63,8 @@ cat < $cfg $cfg ietf-netconf:startup - ${YANG_INSTALLDIR} ${OPENCONFIG} + ${YANG_INSTALLDIR} true /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli