mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
@@ -49,12 +49,15 @@ Json::Value WSConnection::invokeCommand(Json::Value& jvRequest)
|
||||
Json::Value jvResult(Json::objectValue);
|
||||
|
||||
// Regular RPC command
|
||||
jvResult["result"] = mRPCHandler.doCommand(
|
||||
jvRequest["command"].asString(),
|
||||
jvRequest.isMember("params")
|
||||
? jvRequest["params"]
|
||||
: jvRequest,
|
||||
mHandler->getPublic() ? RPCHandler::GUEST : RPCHandler::ADMIN);
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock sl(theApp->getMasterLock());
|
||||
jvResult["result"] = mRPCHandler.doCommand(
|
||||
jvRequest["command"].asString(),
|
||||
jvRequest.isMember("params")
|
||||
? jvRequest["params"]
|
||||
: jvRequest,
|
||||
mHandler->getPublic() ? RPCHandler::GUEST : RPCHandler::ADMIN);
|
||||
}
|
||||
|
||||
// Currently we will simply unwrap errors returned by the RPC
|
||||
// API, in the future maybe we can make the responses
|
||||
|
||||
@@ -116,7 +116,14 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
send(cpClient, mMap[cpClient]->invokeCommand(jvRequest));
|
||||
boost::shared_ptr<WSConnection> conn;
|
||||
{
|
||||
boost::mutex::scoped_lock sl(mMapLock);
|
||||
conn = mMap[cpClient];
|
||||
}
|
||||
if (!conn)
|
||||
return;
|
||||
send(cpClient, conn->invokeCommand(jvRequest));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user