aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-12-04 22:01:49 +0200
committerRiccardo Spagni <ric@spagni.net>2016-12-04 22:01:49 +0200
commitfe89782512cf98e6c4f1b847887f4c88b4c01eaa (patch)
tree7d0bcdcef1120dde2bf6c7456692e62d018a4790 /src/wallet/wallet2.cpp
parentMerge pull request #1378 (diff)
parentImprove daemon RPC version handling (diff)
downloadmonero-fe89782512cf98e6c4f1b847887f4c88b4c01eaa.tar.xz
Merge pull request #1379
d6086f5b Improve daemon RPC version handling (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index ea3994435..a5444ec14 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2221,7 +2221,7 @@ bool wallet2::prepare_file_names(const std::string& file_path)
return true;
}
//----------------------------------------------------------------------------------------------------
-bool wallet2::check_connection(bool *same_version)
+bool wallet2::check_connection(uint32_t *version)
{
boost::lock_guard<boost::mutex> lock(m_daemon_rpc_mutex);
@@ -2239,7 +2239,7 @@ bool wallet2::check_connection(bool *same_version)
return false;
}
- if (same_version)
+ if (version)
{
epee::json_rpc::request<cryptonote::COMMAND_RPC_GET_VERSION::request> req_t = AUTO_VAL_INIT(req_t);
epee::json_rpc::response<cryptonote::COMMAND_RPC_GET_VERSION::response, std::string> resp_t = AUTO_VAL_INIT(resp_t);
@@ -2248,9 +2248,9 @@ bool wallet2::check_connection(bool *same_version)
req_t.method = "get_version";
bool r = net_utils::invoke_http_json_remote_command2(m_daemon_address + "/json_rpc", req_t, resp_t, m_http_client);
if (!r || resp_t.result.status != CORE_RPC_STATUS_OK)
- *same_version = false;
+ *version = 0;
else
- *same_version = resp_t.result.version == CORE_RPC_VERSION;
+ *version = resp_t.result.version;
}
return true;