projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.7' into collectd-5.8
[collectd.git]
/
src
/
curl_json.c
diff --git
a/src/curl_json.c
b/src/curl_json.c
index
756f24f
..
a2f287a
100644
(file)
--- a/
src/curl_json.c
+++ b/
src/curl_json.c
@@
-226,11
+226,6
@@
static void cj_advance_array(cj_t *db) {
#define CJ_CB_ABORT 0
#define CJ_CB_CONTINUE 1
#define CJ_CB_ABORT 0
#define CJ_CB_CONTINUE 1
-static int cj_cb_boolean(void *ctx, int boolVal) {
- cj_advance_array(ctx);
- return CJ_CB_CONTINUE;
-}
-
static int cj_cb_null(void *ctx) {
cj_advance_array(ctx);
return CJ_CB_CONTINUE;
static int cj_cb_null(void *ctx) {
cj_advance_array(ctx);
return CJ_CB_CONTINUE;
@@
-292,6
+287,13
@@
static int cj_cb_string(void *ctx, const unsigned char *val, yajl_len_t len) {
return cj_cb_number(ctx, (const char *)val, len);
} /* int cj_cb_string */
return cj_cb_number(ctx, (const char *)val, len);
} /* int cj_cb_string */
+static int cj_cb_boolean(void *ctx, int boolVal) {
+ if (boolVal)
+ return cj_cb_number(ctx, "1", 1);
+ else
+ return cj_cb_number(ctx, "0", 1);
+} /* int cj_cb_boolean */
+
static int cj_cb_end(void *ctx) {
cj_t *db = (cj_t *)ctx;
memset(&db->state[db->depth], 0, sizeof(db->state[db->depth]));
static int cj_cb_end(void *ctx) {
cj_t *db = (cj_t *)ctx;
memset(&db->state[db->depth], 0, sizeof(db->state[db->depth]));