daemon: fix ban seconds being misinterpreted as absolute

Absolute to relative conversion is already done by the callee.
This commit is contained in:
moneromooo-monero 2016-07-10 15:11:23 +01:00
parent 34ecfdbf15
commit 78cc10f3fa
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -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;