* 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

@ -460,13 +460,15 @@ api_path_fmt2api_path(const char *api_path_fmt,
char *str;
char *strenc=NULL;
cg_var *cv;
size_t len;
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;
}
j = 1; /* j==0 is cli string */
for (i=0; i<strlen(api_path_fmt); i++){
len = strlen(api_path_fmt);
for (i=0; i<len; i++){
c = api_path_fmt[i];
if (esc){
esc = 0;
@ -546,13 +548,15 @@ api_path_fmt2xpath(char *api_path_fmt,
int j;
char *str;
cg_var *cv;
size_t len;
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;
}
j = 1; /* j==0 is cli string */
for (i=0; i<strlen(api_path_fmt); i++){
len = strlen(api_path_fmt);
for (i=0; i<len; i++){
c = api_path_fmt[i];
if (esc){
esc = 0;