Add RPCService, call the Manager from RPCServerHandler

This commit is contained in:
Vinnie Falco
2013-09-21 16:57:36 -07:00
parent be1cede458
commit e59293ec92
15 changed files with 474 additions and 46 deletions

View File

@@ -3697,7 +3697,16 @@ Json::Value RPCHandler::doRpcCommand (const std::string& strMethod, Json::Value
// Provide the JSON-RPC method as the field "command" in the request.
params["command"] = strMethod;
Json::Value jvResult = doCommand (params, iRole, loadType);
Json::Value jvResult;
#if RIPPLE_USE_RPC_SERVICE_MANAGER
std::pair <bool, Json::Value> result (getApp().
getRPCServiceManager().call (strMethod, params));
if (result.first)
jvResult = result.second;
else
#endif
jvResult = doCommand (params, iRole, loadType);
// Always report "status". On an error report the request as received.
if (jvResult.isMember ("error"))