aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-26 08:24:50 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-27 19:52:39 +0000
commitb90c4bc39ee336bf0a0cb6e40876926baf06d1fe (patch)
treeca3b39687ea5b70e6e9a48dc3c72ee9d738db5eb /src/rpc/core_rpc_server.cpp
parentmake_test_signature: exit nicely on top level exception (diff)
downloadmonero-b90c4bc39ee336bf0a0cb6e40876926baf06d1fe.tar.xz
rpc: error out from get_info if the proxied call errors out
Coverity 205410
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 858b35df2..5a4ad0506 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -2226,8 +2226,7 @@ namespace cryptonote
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_info_json(const COMMAND_RPC_GET_INFO::request& req, COMMAND_RPC_GET_INFO::response& res, epee::json_rpc::error& error_resp, const connection_context *ctx)
{
- on_get_info(req, res, ctx);
- if (res.status != CORE_RPC_STATUS_OK)
+ if (!on_get_info(req, res, ctx) || res.status != CORE_RPC_STATUS_OK)
{
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
error_resp.message = res.status;