mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Show any multiple connections from the same IP in peer list
The uniqueness of peers is now determined by their IP, port and connection type (uTP etc.) instead of just their IP
This commit is contained in:
@@ -68,3 +68,13 @@ QString PeerAddress::toString() const
|
||||
: ip.toString();
|
||||
return (ipStr + ':' + QString::number(port));
|
||||
}
|
||||
|
||||
bool BitTorrent::operator==(const BitTorrent::PeerAddress &left, const BitTorrent::PeerAddress &right)
|
||||
{
|
||||
return (left.ip == right.ip) && (left.port == right.port);
|
||||
}
|
||||
|
||||
uint BitTorrent::qHash(const BitTorrent::PeerAddress &addr, const uint seed)
|
||||
{
|
||||
return (::qHash(addr.ip, seed) ^ ::qHash(addr.port));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user