aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-08-12 19:16:06 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-08-13 08:52:17 -0300
commit6b3cd381dcd01268479dc56103498a029133644d (patch)
tree0944a99a09ca4c574d4a3945e9bcb9d4f0e8d505 /src/nvim/msgpack_rpc
parent166d8c799f367e64744cef4d9a6ddd386809ece8 (diff)
downloadrneovim-6b3cd381dcd01268479dc56103498a029133644d.tar.gz
rneovim-6b3cd381dcd01268479dc56103498a029133644d.tar.bz2
rneovim-6b3cd381dcd01268479dc56103498a029133644d.zip
rstream: Pass read count to read events
This is necessary to keep events in the same order received from the OS.
Diffstat (limited to 'src/nvim/msgpack_rpc')
-rw-r--r--src/nvim/msgpack_rpc/channel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 6674f3c4e4..0e3b8200c9 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -328,7 +328,8 @@ static void channel_from_stdio(void)
wstream_init_fd(&loop, &channel->data.std.out, 1, 0, NULL);
}
-static void forward_stderr(Stream *stream, RBuffer *rbuf, void *data, bool eof)
+static void forward_stderr(Stream *stream, RBuffer *rbuf, size_t count,
+ void *data, bool eof)
{
while (rbuffer_size(rbuf)) {
char buf[256];
@@ -343,7 +344,8 @@ static void process_exit(Process *proc, int status, void *data)
decref(data);
}
-static void parse_msgpack(Stream *stream, RBuffer *rbuf, void *data, bool eof)
+static void parse_msgpack(Stream *stream, RBuffer *rbuf, size_t c, void *data,
+ bool eof)
{
Channel *channel = data;
incref(channel);