Use 5.3 cligen API

This commit is contained in:
Olof hagsand 2021-10-31 16:36:29 +01:00
parent 46647089ad
commit d335a72659

View file

@ -683,8 +683,15 @@ clicon_parse(clicon_handle h,
fprintf(stderr, "No such parse-tree registered: %s\n", modename); fprintf(stderr, "No such parse-tree registered: %s\n", modename);
goto done; goto done;
} }
if (cliread_parse(cli_cligen(h), cmd, pt, &match_obj, &cvv, result, &reason) < 0) #if 0 // switch after 5.4
if (cliread_parse2(cli_cligen(h), cmd, pt, &match_obj, &cvv, result, &reason) < 0)
goto done; goto done;
#else
if ((cvv = cvec_new(0)) == NULL)
goto done;;
if (cliread_parse(cli_cligen(h), cmd, pt, &match_obj, cvv, result, &reason) < 0)
goto done;
#endif
/* Debug command and result code */ /* Debug command and result code */
clicon_debug(1, "%s result:%d command: \"%s\"", __FUNCTION__, *result, cmd); clicon_debug(1, "%s result:%d command: \"%s\"", __FUNCTION__, *result, cmd);
if (*result != CG_MATCH) if (*result != CG_MATCH)