summaryrefslogtreecommitdiff
path: root/community-testing/collectd/yajl-2.x.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-10-01 23:14:36 +0000
committerroot <root@rshg054.dnsready.net>2011-10-01 23:14:36 +0000
commit0f78806d775c4d46c649425fcb67964d53531db8 (patch)
tree7f0a7491cc53b811c9b5d8f10af67e263391fed6 /community-testing/collectd/yajl-2.x.patch
parent22b22c6e016b2a86a0d25e68eeb3fdec286f5352 (diff)
Sat Oct 1 23:14:36 UTC 2011
Diffstat (limited to 'community-testing/collectd/yajl-2.x.patch')
-rw-r--r--community-testing/collectd/yajl-2.x.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/community-testing/collectd/yajl-2.x.patch b/community-testing/collectd/yajl-2.x.patch
new file mode 100644
index 000000000..b90543dfe
--- /dev/null
+++ b/community-testing/collectd/yajl-2.x.patch
@@ -0,0 +1,57 @@
+--- old/src/curl_json.c 2011-04-25 20:43:00.972938855 -0400
++++ new/src/curl_json.c 2011-04-25 20:46:03.859938860 -0400
+@@ -98,8 +98,7 @@
+ return (0);
+
+ status = yajl_parse(db->yajl, (unsigned char *)buf, len);
+- if ((status != yajl_status_ok)
+- && (status != yajl_status_insufficient_data))
++ if ((status != yajl_status_ok))
+ {
+ unsigned char *msg =
+ yajl_get_error(db->yajl, /* verbose = */ 1,
+@@ -130,7 +129,7 @@
+ /* "number" may not be null terminated, so copy it into a buffer before
+ * parsing. */
+ static int cj_cb_number (void *ctx,
+- const char *number, unsigned int number_len)
++ const char *number, size_t number_len)
+ {
+ char buffer[number_len + 1];
+
+@@ -159,7 +158,7 @@
+ } /* int cj_cb_number */
+
+ static int cj_cb_map_key (void *ctx, const unsigned char *val,
+- unsigned int len)
++ size_t len)
+ {
+ cj_t *db = (cj_t *)ctx;
+ c_avl_tree_t *tree;
+@@ -187,7 +186,7 @@
+ }
+
+ static int cj_cb_string (void *ctx, const unsigned char *val,
+- unsigned int len)
++ size_t len)
+ {
+ cj_t *db = (cj_t *)ctx;
+ char str[len + 1];
+@@ -697,7 +696,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.");
+@@ -730,7 +729,7 @@
+ return (-1);
+ }
+
+- status = yajl_parse_complete (db->yajl);
++ status = yajl_complete_parse (db->yajl);
+ if (status != yajl_status_ok)
+ {
+ unsigned char *errmsg;