aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-10 15:11:23 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-10 15:13:53 +0100
commit78cc10f3fa8f5f7e058d4cc2b6793af5907e6f50 (patch)
tree8111243530653535918e1065ec5cc1b741518c39 /src
parentrpc: fix get_bans and set_bans RPC names, they were missing a _ (diff)
downloadmonero-78cc10f3fa8f5f7e058d4cc2b6793af5907e6f50.tar.xz
daemon: fix ban seconds being misinterpreted as absolute
Absolute to relative conversion is already done by the callee.
Diffstat (limited to 'src')
-rw-r--r--src/daemon/rpc_command_executor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index ae9492111..0a0fc793d 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -1123,11 +1123,9 @@ bool t_rpc_command_executor::print_bans()
}
}
- time_t now = time(nullptr);
for (auto i = res.bans.begin(); i != res.bans.end(); ++i)
{
- time_t seconds = i->seconds - now;
- tools::msg_writer() << epee::string_tools::get_ip_string_from_int32(i->ip) << " banned for " << seconds << " seconds";
+ tools::msg_writer() << epee::string_tools::get_ip_string_from_int32(i->ip) << " banned for " << i->seconds << " seconds";
}
return true;