* JSON errors are now labelled with JSON and not XML

* Fixed: [Performance issue when parsing large JSON param](https://github.com/clicon/clixon/issues/266)
* Moved strlen() from for end condition
* Fixed debugging of xpath parser
This commit is contained in:
Olof hagsand 2021-09-20 20:30:56 +02:00
parent 3cd3f7987d
commit 392e6679c5
17 changed files with 166 additions and 89 deletions

View file

@ -521,6 +521,7 @@ cli_auto_up(clicon_handle h,
char *api_path = NULL;
int i;
int j;
size_t len;
if (cvec_len(argv) != 1){
clicon_err(OE_PLUGIN, EINVAL, "Usage: %s(<treename>)", __FUNCTION__);
@ -551,7 +552,8 @@ cli_auto_up(clicon_handle h,
/* Find diff of 0 and 1 (how many variables differ?) and trunc cvv0 by that amount */
cvv0 = clicon_data_cvec_get(h, "cli-edit-cvv");
j=0; /* count diffs */
for (i=strlen(api_path_fmt1); i<strlen(api_path_fmt0); i++)
len = strlen(api_path_fmt0);
for (i=strlen(api_path_fmt1); i<len; i++)
if (api_path_fmt0[i] == '%')
j++;
cvv1 = cvec_new(0);