Skip to content
Permalink
Browse files

rpc: error out from get_info if the proxied call errors out

Coverity 205410
  • Loading branch information
moneromooo-monero committed Oct 26, 2019
1 parent fa16df9 commit b90c4bc39ee336bf0a0cb6e40876926baf06d1fe
Showing with 1 addition and 2 deletions.
  1. +1 −2 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;

0 comments on commit b90c4bc

Please sign in to comment.
You can’t perform that action at this time.