|
|
@ -2294,6 +2294,7 @@ void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p) |
|
|
|
|
|
|
|
|
|
|
|
void Session::handleListenFailedAlert(libt::listen_failed_alert *p) |
|
|
|
void Session::handleListenFailedAlert(libt::listen_failed_alert *p) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
boost::system::error_code ec; |
|
|
|
QString proto = "TCP"; |
|
|
|
QString proto = "TCP"; |
|
|
|
if (p->sock_type == libt::listen_failed_alert::udp) |
|
|
|
if (p->sock_type == libt::listen_failed_alert::udp) |
|
|
|
proto = "UDP"; |
|
|
|
proto = "UDP"; |
|
|
@ -2305,24 +2306,12 @@ void Session::handleListenFailedAlert(libt::listen_failed_alert *p) |
|
|
|
proto = "I2P"; |
|
|
|
proto = "I2P"; |
|
|
|
else if (p->sock_type == libt::listen_failed_alert::socks5) |
|
|
|
else if (p->sock_type == libt::listen_failed_alert::socks5) |
|
|
|
proto = "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(); |
|
|
|
qDebug() << "Failed listening on " << proto << p->endpoint.address().to_string(ec).c_str() << "/" << p->endpoint.port(); |
|
|
|
Logger::instance()->addMessage( |
|
|
|
Logger::instance()->addMessage( |
|
|
|
tr("qBittorrent failed listening on interface %1 port: %2/%3. Reason: %4.", |
|
|
|
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.") |
|
|
|
"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(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); |
|
|
|
.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) |
|
|
|
void Session::handleExternalIPAlert(libt::external_ip_alert *p) |
|
|
|