summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2020-03-18 21:33:10 +0200
committerGitHub <noreply@github.com>2020-03-18 21:33:10 +0200
commit28d82faf7f0460b4d38ed2b83ed3cea1ff5a7b10 (patch)
tree71332526f6e45cf3bdd3990201c8fa800839bb47 /libnetdata
parentb9e77822fdcd354f07ca82a238ad5807bab29753 (diff)
Fixed JSON parsing (#8426)
* Fixed an issue with the internal JSON parser which made it fail to parse ACLK challenge/response related payloads
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/json/json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnetdata/json/json.c b/libnetdata/json/json.c
index 3ccc561c6f..94f670edf2 100644
--- a/libnetdata/json/json.c
+++ b/libnetdata/json/json.c
@@ -299,7 +299,7 @@ size_t json_walk_array(char *js, jsmntok_t *t, size_t nest, size_t start, JSON_E
memcpy(&ne, e, sizeof(JSON_ENTRY));
ne.type = JSON_ARRAY;
ne.data.items = t[start].size;
- ne.callback_function = NULL;
+ ne.callback_function = e->callback_function;
ne.name[0]='\0';
ne.fullname[0]='\0';
if(e->callback_function) e->callback_function(&ne);
@@ -365,7 +365,7 @@ size_t json_walk_object(char *js, jsmntok_t *t, size_t nest, size_t start, JSON_
ne.original_string = &js[t[start].start];
memcpy(&ne, e, sizeof(JSON_ENTRY));
ne.type = JSON_OBJECT;
- ne.callback_function = NULL;
+ ne.callback_function = e->callback_function;
if(e->callback_function) e->callback_function(&ne);
js[t[start].end] = old;