mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
Fix compilation with libtorrent 0.16.x.
This commit is contained in:
parent
78d4258dac
commit
14d27d982d
1 changed files with 4 additions and 3 deletions
|
@ -2629,6 +2629,10 @@ void QBtSession::handlePeerBlockedAlert(libtorrent::peer_blocked_alert* p)
|
||||||
{
|
{
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
string ip = p->ip.to_string(ec);
|
string ip = p->ip.to_string(ec);
|
||||||
|
#if LIBTORRENT_VERSION_NUM < 10000
|
||||||
|
if (!ec)
|
||||||
|
addPeerBanMessage(QString::fromLatin1(ip.c_str()), true);
|
||||||
|
#else
|
||||||
QString reason;
|
QString reason;
|
||||||
switch (p->reason) {
|
switch (p->reason) {
|
||||||
case peer_blocked_alert::ip_filter:
|
case peer_blocked_alert::ip_filter:
|
||||||
|
@ -2652,9 +2656,6 @@ void QBtSession::handlePeerBlockedAlert(libtorrent::peer_blocked_alert* p)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ec)
|
if (!ec)
|
||||||
#if LIBTORRENT_VERSION_NUM < 10000
|
|
||||||
addPeerBanMessage(QString::fromLatin1(ip.c_str()), true);
|
|
||||||
#else
|
|
||||||
addPeerBanMessage(QString::fromLatin1(ip.c_str()), true, reason);
|
addPeerBanMessage(QString::fromLatin1(ip.c_str()), true, reason);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue