mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-11 04:32:30 +00:00
Removed ifdef for ipv6.
This commit is contained in:
@@ -68,11 +68,7 @@ WindowPeerList::redraw() {
|
||||
int x = 2;
|
||||
int y = 0;
|
||||
|
||||
#ifdef RAK_USE_INET6
|
||||
m_canvas->print(x, y, "IP"); x += 25;
|
||||
#else
|
||||
m_canvas->print(x, y, "IP"); x += 16;
|
||||
#endif
|
||||
m_canvas->print(x, y, "UP"); x += 7;
|
||||
m_canvas->print(x, y, "DOWN"); x += 7;
|
||||
m_canvas->print(x, y, "PEER"); x += 7;
|
||||
@@ -104,20 +100,15 @@ WindowPeerList::redraw() {
|
||||
x = 0;
|
||||
|
||||
std::string ip_address = rak::socket_address::cast_from(p->address())->address_str();
|
||||
#ifdef RAK_USE_INET6
|
||||
|
||||
if (ip_address.size() >= 24) {
|
||||
ip_address.replace(ip_address.begin() + 21, ip_address.end(), "...");
|
||||
}
|
||||
#endif
|
||||
|
||||
m_canvas->print(x, y, "%c %s",
|
||||
range.first == *m_focus ? '*' : ' ',
|
||||
ip_address.c_str());
|
||||
#ifdef RAK_USE_INET6
|
||||
x += 27;
|
||||
#else
|
||||
x += 18;
|
||||
#endif
|
||||
|
||||
m_canvas->print(x, y, "%.1f", (double)p->up_rate()->rate() / 1024); x += 7;
|
||||
m_canvas->print(x, y, "%.1f", (double)p->down_rate()->rate() / 1024); x += 7;
|
||||
|
||||
Reference in New Issue
Block a user