From 6f5c129c922a2583b58d8609c1a1a9e078389937 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 26 Oct 2015 10:17:03 +0000 Subject: rpc: fix a few commands not working as command line The method name to the "json_rpc" commands are names, not part of URLs. --- src/daemon/rpc_command_executor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/daemon') diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index b0fe5945b..38d20ec39 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -255,7 +255,7 @@ bool t_rpc_command_executor::print_connections() { if (m_is_rpc) { - if (!m_rpc_client->json_rpc_request(req, res, "/get_connections", fail_message.c_str())) + if (!m_rpc_client->json_rpc_request(req, res, "get_connections", fail_message.c_str())) { return true; } @@ -880,7 +880,7 @@ bool t_rpc_command_executor::out_peers(uint64_t limit) if (m_is_rpc) { - if (!m_rpc_client->json_rpc_request(req, res, "/out_peers", fail_message.c_str())) + if (!m_rpc_client->json_rpc_request(req, res, "out_peers", fail_message.c_str())) { return true; } @@ -959,7 +959,7 @@ bool t_rpc_command_executor::hard_fork_info(uint8_t version) if (m_is_rpc) { - if (!m_rpc_client->json_rpc_request(req, res, "/hard_fork_info", fail_message.c_str())) + if (!m_rpc_client->json_rpc_request(req, res, "hard_fork_info", fail_message.c_str())) { return true; } -- cgit v1.2.3 From 06c65cb0ef5b93c5d78ac3235e9e5f51952db070 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 26 Oct 2015 10:17:48 +0000 Subject: rpc: fix hard_fork_info RPC I had never tested it, obviously --- src/daemon/rpc_command_executor.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/daemon') diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 38d20ec39..8e0347279 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -971,11 +971,13 @@ bool t_rpc_command_executor::hard_fork_info(uint8_t version) tools::fail_msg_writer() << fail_message.c_str(); return true; } - version = version > 0 ? version : res.voting; - tools::msg_writer() << "version " << (uint32_t)version << " " << (res.enabled ? "enabled" : "not enabled") << - ", " << res.votes << "/" << res.window << " votes, threshold " << res.threshold; - tools::msg_writer() << "current version " << (uint32_t)res.version << ", voting for version " << (uint32_t)res.voting; } + + version = version > 0 ? version : res.voting; + tools::msg_writer() << "version " << (uint32_t)version << " " << (res.enabled ? "enabled" : "not enabled") << + ", " << res.votes << "/" << res.window << " votes, threshold " << res.threshold; + tools::msg_writer() << "current version " << (uint32_t)res.version << ", voting for version " << (uint32_t)res.voting; + return true; } -- cgit v1.2.3