curl_json: fix the array access implemented in f1e1e37e
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 30 Oct 2014 20:32:17 +0000 (21:32 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Fri, 31 Oct 2014 09:29:48 +0000 (10:29 +0100)
commit1e585c5d2b185194e76dd477e466a1fc5575798a
treebc25fcbca347b5fe343b6257c03fd0d5e10f995f
parentb594d048c7a8856be5984d5cc42b3a5d66863333
curl_json: fix the array access implemented in f1e1e37e

In the avl-tree we store two different structs, cj_key_t for the value
we search, c_avl_tree_t for sub-nodes.
The old version does assume when it will find a key, and when a tree,
which doesn't have to be right in all cases.
Therefore we utilize the magic to revalidate this cast.
Being able to tell tree from key, we now can also implement array access
on the right most node of the tree-path.
src/collectd.conf.in
src/curl_json.c