SHA256
1
0
forked from pool/collectd
collectd/collectd-fix_new_yajl_lib.patch

25 lines
660 B
Diff

--- src/curl_json.c
+++ src/curl_json.c
@@ -100,11 +100,9 @@
status = yajl_parse(db->yajl, (unsigned char *)buf, len);
if (status == yajl_status_ok)
{
- status = yajl_parse_complete(db->yajl);
+ status = yajl_complete_parse(db->yajl);
return (len);
}
- else if (status == yajl_status_insufficient_data)
- return (len);
if (status != yajl_status_ok)
{
@@ -760,7 +758,7 @@
char *url;
yajl_handle yprev = db->yajl;
- db->yajl = yajl_alloc (&ycallbacks, NULL, NULL, (void *)db);
+ db->yajl = yajl_alloc (&ycallbacks, NULL, (void *)db);
if (db->yajl == NULL)
{
ERROR ("curl_json plugin: yajl_alloc failed.");