aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-09-24 10:42:29 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-09-24 10:42:29 -0500
commit3f6096867d916e832d5d7b84ae89ec249b696f96 (patch)
tree501f975e433eebe7d3defc701f9739f43ee26c83 /src/rpc/core_rpc_server.cpp
parentcb2bb1a9b865aff58e28ef00c97b69dde3166e7a (diff)
parent7b076d5170f3299b1933f990e8b35777083c1809 (diff)
downloadmonzero-core-3f6096867d916e832d5d7b84ae89ec249b696f96.tar.gz
monzero-core-3f6096867d916e832d5d7b84ae89ec249b696f96.tar.xz
monzero-core-3f6096867d916e832d5d7b84ae89ec249b696f96.zip
Merge pull request #5916
7b076d5 p2p: fix bans taking port into account (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 7d6472ddb..3f53d59cf 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1985,12 +1985,12 @@ namespace cryptonote
PERF_TIMER(on_get_bans);
auto now = time(nullptr);
- std::map<epee::net_utils::network_address, time_t> blocked_hosts = m_p2p.get_blocked_hosts();
- for (std::map<epee::net_utils::network_address, time_t>::const_iterator i = blocked_hosts.begin(); i != blocked_hosts.end(); ++i)
+ std::map<std::string, time_t> blocked_hosts = m_p2p.get_blocked_hosts();
+ for (std::map<std::string, time_t>::const_iterator i = blocked_hosts.begin(); i != blocked_hosts.end(); ++i)
{
if (i->second > now) {
COMMAND_RPC_GETBANS::ban b;
- b.host = i->first.host_str();
+ b.host = i->first;
b.ip = 0;
uint32_t ip;
if (epee::string_tools::get_ip_int32_from_string(ip, b.host))