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
This commit is contained in:
Thiago de Arruda
2014-09-03 14:55:55 -03:00
parent 74aff19691
commit 19bc29ee83
2 changed files with 11 additions and 13 deletions

View File

@@ -115,6 +115,16 @@ void msgpack_rpc_error(char *msg, msgpack_packer *res)
msgpack_pack_nil(res);
}
/// Handler executed when an invalid method name is passed
Object msgpack_rpc_handle_missing_method(uint64_t channel_id,
msgpack_object *req,
Error *error)
{
snprintf(error->msg, sizeof(error->msg), "Invalid method name");
error->set = true;
return NIL;
}
/// Serializes a msgpack-rpc request or notification(id == 0)
WBuffer *serialize_request(uint64_t request_id,
String method,