patch 7.4.1238
Problem: Can't handle two messages right after each other.
Solution: Find the end of the JSON. Read more when incomplete. Add a C
test for the JSON decoding.
diff --git a/src/channel.c b/src/channel.c
index 8cb9a35..db13c8a 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -540,9 +540,8 @@
/* TODO: make reader work properly */
/* reader.js_buf = channel_peek(ch_idx); */
reader.js_buf = channel_get_all(ch_idx);
- reader.js_eof = TRUE;
- /* reader.js_eof = FALSE; */
reader.js_used = 0;
+ reader.js_fill = NULL;
/* reader.js_fill = channel_fill; */
reader.js_cookie = &ch_idx;
if (json_decode(&reader, &listtv) == OK)