diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-08-14 15:21:47 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-08-14 15:21:47 -0500 |
commit | e37e263fcdfa71790e9375fb9f885dca5bd1d470 (patch) | |
tree | 81d634746b0683330cb9beb08053a1b3a73ca160 /src/daemon/rpc_command_executor.cpp | |
parent | Merge pull request #5779 (diff) | |
parent | Add IPv6 support (diff) | |
download | monero-e37e263fcdfa71790e9375fb9f885dca5bd1d470.tar.xz |
Merge pull request #4851
155475d Add IPv6 support (KeeJef/tewinget)
Diffstat (limited to 'src/daemon/rpc_command_executor.cpp')
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index ea986a398..ca80e8e98 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -68,7 +68,7 @@ namespace { std::string id_str; std::string port_str; std::string elapsed = peer.last_seen == 0 ? "never" : epee::misc_utils::get_time_interval_string(now - last_seen); - std::string ip_str = epee::string_tools::get_ip_string_from_int32(peer.ip); + std::string ip_str = peer.ip != 0 ? epee::string_tools::get_ip_string_from_int32(peer.ip) : std::string("[") + peer.host + "]"; std::stringstream peer_id_str; peer_id_str << std::hex << std::setw(16) << peer.id; peer_id_str >> id_str; |