comparison src/channel.c @ 7883:98a96e0ca73b v7.4.1238

commit https://github.com/vim/vim/commit/56ead341a75e1a0395eee94a3280c67e2278a57e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 2 18:20:08 2016 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Tue, 02 Feb 2016 18:30:04 +0100
parents 4b9d4600166f
children 6e6f829af138
comparison
equal deleted inserted replaced
7882:a3d3ab0f7b27 7883:98a96e0ca73b
538 return; 538 return;
539 539
540 /* TODO: make reader work properly */ 540 /* TODO: make reader work properly */
541 /* reader.js_buf = channel_peek(ch_idx); */ 541 /* reader.js_buf = channel_peek(ch_idx); */
542 reader.js_buf = channel_get_all(ch_idx); 542 reader.js_buf = channel_get_all(ch_idx);
543 reader.js_eof = TRUE;
544 /* reader.js_eof = FALSE; */
545 reader.js_used = 0; 543 reader.js_used = 0;
544 reader.js_fill = NULL;
546 /* reader.js_fill = channel_fill; */ 545 /* reader.js_fill = channel_fill; */
547 reader.js_cookie = &ch_idx; 546 reader.js_cookie = &ch_idx;
548 if (json_decode(&reader, &listtv) == OK) 547 if (json_decode(&reader, &listtv) == OK)
549 { 548 {
550 item = (jsonq_T *)alloc((unsigned)sizeof(jsonq_T)); 549 item = (jsonq_T *)alloc((unsigned)sizeof(jsonq_T));