projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6b9d3b
)
curl_json plugin: don't complain about not finding expected maps in arrays
author
Jim Radford
<radford@galvanix.com>
Mon, 19 Aug 2013 23:07:28 +0000
(16:07 -0700)
committer
Jim Radford
<radford@galvanix.com>
Mon, 19 Aug 2013 23:07:28 +0000
(16:07 -0700)
The arrays may have mixed maps and scalars. I'm looking at you Solr.
src/curl_json.c
patch
|
blob
|
history
diff --git
a/src/curl_json.c
b/src/curl_json.c
index
511863e
..
b7eaf39
100644
(file)
--- a/
src/curl_json.c
+++ b/
src/curl_json.c
@@
-229,7
+229,7
@@
static int cj_cb_number (void *ctx,
buffer[sizeof (buffer) - 1] = 0;
if ((key == NULL) || !CJ_IS_KEY (key)) {
- if (key != NULL)
+ if (key != NULL
&& !db->state[db->depth].in_array/*can be inhomogeneous*/
)
NOTICE ("curl_json plugin: Found \"%s\", but the configuration expects"
" a map.", buffer);
cj_cb_inc_array_index (ctx, /* update_key = */ 0);