From c1f7446c26881a4f40ccc55e2716b020cfdc4045 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 21 Feb 2016 18:42:55 +0200 Subject: [PATCH] Partially revert decfae7b8a4a24. Newer libtorrent RC_1_1 has added back the missing variables. --- src/base/bittorrent/session.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 34e8dea49..b182745df 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -2294,6 +2294,7 @@ void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p) void Session::handleListenFailedAlert(libt::listen_failed_alert *p) { + boost::system::error_code ec; QString proto = "TCP"; if (p->sock_type == libt::listen_failed_alert::udp) proto = "UDP"; @@ -2305,24 +2306,12 @@ void Session::handleListenFailedAlert(libt::listen_failed_alert *p) proto = "I2P"; else if (p->sock_type == libt::listen_failed_alert::socks5) proto = "SOCKS5"; - -#if LIBTORRENT_VERSION_NUM < 10100 - boost::system::error_code ec; qDebug() << "Failed listening on " << proto << p->endpoint.address().to_string(ec).c_str() << "/" << p->endpoint.port(); Logger::instance()->addMessage( tr("qBittorrent failed listening on interface %1 port: %2/%3. Reason: %4.", "e.g: qBittorrent failed listening on interface 192.168.0.1 port: TCP/6881. Reason: already in use.") .arg(p->endpoint.address().to_string(ec).c_str()).arg(proto).arg(QString::number(p->endpoint.port())) .arg(QString::fromLocal8Bit(p->error.message().c_str())), Log::CRITICAL); -#else - qDebug() << "Failed listening on " << proto << p->listen_interface(); - Logger::instance()->addMessage( - tr("qBittorrent failed listening on interface %1 [%2]. Reason: %3.", - "e.g: qBittorrent failed listening on interface 192.168.0.1 [TCP]. Reason: already in use.") - .arg(QString::fromUtf8(p->listen_interface())) - .arg(proto) - .arg(Utils::String::fromStdString(p->error.message())), Log::CRITICAL); -#endif } void Session::handleExternalIPAlert(libt::external_ip_alert *p)