X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=a7acc81ca42a233393ca6701b0cb244f1d6206a4;hb=66124ee0d4b7677b2243c6a722eaad621d694f46;hp=e3660258e3320f6e3df3cf953f3a3a91f4e38aaa;hpb=5c3e14a2937c7b1b14e6377b1285a36815ca5111;p=collectd.git diff --git a/src/curl_json.c b/src/curl_json.c index e3660258..a7acc81c 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -207,7 +207,7 @@ static int cj_cb_map_key (void *ctx, const unsigned char *val, db->state[db->depth].key = NULL; } - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_string (void *ctx, const unsigned char *val, @@ -218,7 +218,7 @@ static int cj_cb_string (void *ctx, const unsigned char *val, char *ptr; if (db->depth != 1) /* e.g. _all_dbs */ - return 1; + return (CJ_CB_CONTINUE); cj_cb_map_key (ctx, val, len); /* same logic */ @@ -240,7 +240,7 @@ static int cj_cb_string (void *ctx, const unsigned char *val, cj_curl_perform (db, curl); curl_easy_cleanup (curl); } - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_start (void *ctx) @@ -249,9 +249,9 @@ static int cj_cb_start (void *ctx) if (++db->depth >= YAJL_MAX_DEPTH) { ERROR ("curl_json plugin: %s depth exceeds max, aborting.", db->url); - return 0; + return (CJ_CB_ABORT); } - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_end (void *ctx) @@ -259,7 +259,7 @@ static int cj_cb_end (void *ctx) cj_t *db = (cj_t *)ctx; db->state[db->depth].tree = NULL; --db->depth; - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_start_map (void *ctx)