Docs update, externalized cvec_concat_cb, example mem-leak

This commit is contained in:
Olof hagsand 2023-08-15 20:20:44 +02:00
parent e4a7fe0b49
commit fc73493881
7 changed files with 11 additions and 6 deletions

View file

@ -402,7 +402,7 @@ cli_dbxml(clicon_handle h,
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;
}
/* Concatenate all argv strings to a sinle string */
/* Concatenate all argv strings to a single string */
if (cvec_concat_cb(argv, api_path_fmt_cb) < 0)
goto done;
api_path_fmt = cbuf_get(api_path_fmt_cb);
@ -1670,7 +1670,9 @@ cvec_concat_cb(cvec *cvv,
}
/* Append a api_path_fmt from sub-parts */
for (i=argc-1; i>=0; i--){
cprintf(cb, "%s", cv_string_get(cvec_i(cvv, i)));
cv = cvec_i(cvv, i);
str = cv_string_get(cv);
cprintf(cb, "%s", str);
}
retval = 0;
done:

View file

@ -43,7 +43,6 @@ void cli_signal_block(clicon_handle h);
void cli_signal_unblock(clicon_handle h);
int mtpoint_paths(yang_stmt *yspec0, char *mtpoint, char *api_path_fmt1, char **api_path_fmt01);
cvec *cvec_append(cvec *cvv0, cvec *cvv1);
int cvec_concat_cb(cvec *cvv, cbuf *cb);
/* If you do not find a function here it may be in clixon_cli_api.h which is
the external API */

View file

@ -111,6 +111,7 @@ int cli_unlock(clicon_handle h, cvec *cvv, cvec *argv);
int cli_copy_config(clicon_handle h, cvec *cvv, cvec *argv);
int cli_help(clicon_handle h, cvec *vars, cvec *argv);
cvec *cvec_append(cvec *cvv0, cvec *cvv1);
int cvec_concat_cb(cvec *cvv, cbuf *cb);
int cli_process_control(clicon_handle h, cvec *vars, cvec *argv);
/* In cli_show.c */