mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Merge pull request #11918 from thalieht/peerssameip
Show any multiple connections from the same IP in peer list
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));
|
||||
}
|
||||
|
||||
@@ -42,4 +42,7 @@ namespace BitTorrent
|
||||
static PeerAddress parse(const QString &address);
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
bool operator==(const PeerAddress &left, const PeerAddress &right);
|
||||
uint qHash(const PeerAddress &addr, uint seed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user