X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=69d45e39b5f5249a07c6a09cb38db7635772f68c;hb=a4e8b6a17640e1eaec51801fd0f61aef4cd287d9;hp=510d9b621d0b9a32b235337856f455c82eef2b3e;hpb=155102256542b6dab3261cd2d6dfb000354de425;p=collectd.git diff --git a/src/curl_json.c b/src/curl_json.c index 510d9b62..69d45e39 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -131,17 +131,11 @@ static size_t cj_curl_callback (void *buf, /* {{{ */ return (len); #endif - if (status != yajl_status_ok) - { - unsigned char *msg = - yajl_get_error(db->yajl, /* verbose = */ 1, - /* jsonText = */ (unsigned char *) buf, (unsigned int) len); - ERROR ("curl_json plugin: yajl_parse failed: %s", msg); - yajl_free_error(db->yajl, msg); - return (0); /* abort write callback */ - } - - return (len); + unsigned char *msg = yajl_get_error(db->yajl, /* verbose = */ 1, + /* jsonText = */ (unsigned char *) buf, (unsigned int) len); + ERROR ("curl_json plugin: yajl_parse failed: %s", msg); + yajl_free_error(db->yajl, msg); + return (0); /* abort write callback */ } /* }}} size_t cj_curl_callback */ static int cj_get_type (cj_key_t *key)