Skip to content

Commit

Permalink
CLIgen pt_expand API change and mem problems
Browse files Browse the repository at this point in the history
  • Loading branch information
olofhagsand committed May 20, 2020
1 parent 7d0b245 commit 1a1aa58
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ See [LICENSE.md](LICENSE.md) for the license.

Clixon interaction is best done posting issues, pull requests, or joining the
[slack channel](https://clixondev.slack.com).
[Slack invite](https://join.slack.com/t/clixondev/shared_invite/enQtMzI3OTM4MzA3Nzk3LTA3NWM4OWYwYWMxZDhiYTNhNjRkNjQ1NWI1Zjk5M2JjMDk4MTUzMTljYTZiYmNhODkwMDI2ZTkyNWU3ZWMyN2U).
[Slack invite](https://join.slack.com/t/clixondev/shared_invite/zt-egqe8bqt-JSQL49otf2B9MzKSoUoRQg).

Clixon is sponsored by [Rubicon Communications LLC(Netgate)](https://www.netgate.com/)
1 change: 0 additions & 1 deletion apps/backend/backend_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ usage(clicon_handle h,
exit(-1);
}


int
main(int argc,
char **argv)
Expand Down
22 changes: 11 additions & 11 deletions apps/cli/cli_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,16 +321,16 @@ cli_load_syntax_file(clicon_handle h,
return -1;
}
else {
for (i = 0; i < nvec; i++) {
if (syntax_append(h,
cli_syntax(h),
vec[i],
pt) < 0) {
goto done;
for (i = 0; i < nvec; i++) {
if (syntax_append(h,
cli_syntax(h),
vec[i],
pt) < 0) {
goto done;
}
if (prompt)
cli_set_prompt(h, vec[i], prompt);
}
if (prompt)
cli_set_prompt(h, vec[i], prompt);
}
}

cligen_parsetree_free(pt, 1);
Expand Down Expand Up @@ -577,7 +577,7 @@ clicon_parse(clicon_handle h,
if (cliread_parse(cli_cligen(h), cmd, pt, &match_obj, cvv, result, &reason) < 0)
goto done;
if (*result != CG_MATCH)
pt_expand_cleanup_1(pt); /* XXX change to pt_expand_treeref_cleanup */
pt_expand_cleanup(pt); /* XXX change to pt_expand_treeref_cleanup */
if (modename0){
cligen_tree_active_set(cli_cligen(h), modename0);
modename0 = NULL;
Expand All @@ -597,7 +597,7 @@ clicon_parse(clicon_handle h,
}
if ((r = clicon_eval(h, cmd, match_obj, cvv)) < 0)
cli_handler_err(stdout);
pt_expand_cleanup_1(pt); /* XXX change to pt_expand_treeref_cleanup */
pt_expand_cleanup(pt); /* XXX change to pt_expand_treeref_cleanup */
if (evalres)
*evalres = r;
break;
Expand Down

0 comments on commit 1a1aa58

Please sign in to comment.