aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/msgpack_rpc.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-05-26 13:39:08 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-26 14:02:12 -0300
commit139c7ffdc785b19297e8c3b2d2586dfa284f97a5 (patch)
tree79426fb6758f3206b5ae07de2d8eb3b364c5fb5f /src/nvim/os/msgpack_rpc.c
parent7a00caf7c40e8526db2c75cd4c1445b624023728 (diff)
downloadrneovim-139c7ffdc785b19297e8c3b2d2586dfa284f97a5.tar.gz
rneovim-139c7ffdc785b19297e8c3b2d2586dfa284f97a5.tar.bz2
rneovim-139c7ffdc785b19297e8c3b2d2586dfa284f97a5.zip
API: Events: Return channel id from the API discover request
This refactors msgapck_rpc_{dipatch,call} to receive the channel id as argument. Now the discovery request returns the [id, metadata] array.
Diffstat (limited to 'src/nvim/os/msgpack_rpc.c')
-rw-r--r--src/nvim/os/msgpack_rpc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/os/msgpack_rpc.c b/src/nvim/os/msgpack_rpc.c
index 8ca1e0a8c0..62d68ebdec 100644
--- a/src/nvim/os/msgpack_rpc.c
+++ b/src/nvim/os/msgpack_rpc.c
@@ -1,3 +1,6 @@
+#include <stdint.h>
+#include <stdbool.h>
+
#include <msgpack.h>
#include "nvim/os/msgpack_rpc.h"
@@ -52,7 +55,7 @@
free(value.items); \
}
-void msgpack_rpc_call(msgpack_object *req, msgpack_packer *res)
+void msgpack_rpc_call(uint64_t id, msgpack_object *req, msgpack_packer *res)
{
// The initial response structure is the same no matter what happens,
// we set it up here
@@ -107,7 +110,7 @@ void msgpack_rpc_call(msgpack_object *req, msgpack_packer *res)
}
// dispatch the message
- msgpack_rpc_dispatch(req, res);
+ msgpack_rpc_dispatch(id, req, res);
}
void msgpack_rpc_error(char *msg, msgpack_packer *res)