From 19bc29ee834516ff76944741b25fe158d2282b15 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Wed, 3 Sep 2014 14:55:55 -0300 Subject: msgpack-rpc: Move handle_missing_method to msgpack_rpc.c Since that function is not automatically generated, it's best to place it in a normal C module --- scripts/msgpack-gen.lua | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'scripts/msgpack-gen.lua') diff --git a/scripts/msgpack-gen.lua b/scripts/msgpack-gen.lua index f868a67568..946cff1d11 100644 --- a/scripts/msgpack-gen.lua +++ b/scripts/msgpack-gen.lua @@ -220,18 +220,6 @@ for i = 1, #api.functions do end end -output:write([[ -static Object handle_missing_method(uint64_t channel_id, - msgpack_object *req, - Error *error) -{ - snprintf(error->msg, sizeof(error->msg), "Invalid function id"); - error->set = true; - return NIL; -} - -]]) - -- Generate the table of handler functions indexed by method id output:write([[ static const rpc_method_handler_fn rpc_method_handlers[] = { @@ -290,7 +278,7 @@ output:write([[ } if (!handler) { - handler = handle_missing_method; + handler = msgpack_rpc_handle_missing_method; } return handler(channel_id, req, error); -- cgit