mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 17:53:08 -07:00
Merge pull request #12232 from Chocobo1/warning
Add logging for SOCKS5 proxy errors
This commit is contained in:
commit
c6e26f5dd0
2 changed files with 18 additions and 0 deletions
|
@ -4407,6 +4407,11 @@ void Session::handleAlert(const lt::alert *a)
|
||||||
case lt::storage_moved_failed_alert::alert_type:
|
case lt::storage_moved_failed_alert::alert_type:
|
||||||
handleStorageMovedFailedAlert(static_cast<const lt::storage_moved_failed_alert*>(a));
|
handleStorageMovedFailedAlert(static_cast<const lt::storage_moved_failed_alert*>(a));
|
||||||
break;
|
break;
|
||||||
|
#if (LIBTORRENT_VERSION_NUM >= 10204)
|
||||||
|
case lt::socks5_alert::alert_type:
|
||||||
|
handleSocks5Alert(static_cast<const lt::socks5_alert *>(a));
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception &exc) {
|
catch (const std::exception &exc) {
|
||||||
|
@ -4942,3 +4947,13 @@ void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
|
||||||
if (!updatedTorrents.isEmpty())
|
if (!updatedTorrents.isEmpty())
|
||||||
emit torrentsUpdated(updatedTorrents);
|
emit torrentsUpdated(updatedTorrents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (LIBTORRENT_VERSION_NUM >= 10204)
|
||||||
|
void Session::handleSocks5Alert(const lt::socks5_alert *p) const
|
||||||
|
{
|
||||||
|
if (p->error) {
|
||||||
|
LogMsg(tr("SOCKS5 proxy error. Message: %1").arg(QString::fromStdString(p->message()))
|
||||||
|
, Log::WARNING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -596,6 +596,9 @@ namespace BitTorrent
|
||||||
#endif
|
#endif
|
||||||
void handleStorageMovedAlert(const lt::storage_moved_alert *p);
|
void handleStorageMovedAlert(const lt::storage_moved_alert *p);
|
||||||
void handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert *p);
|
void handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert *p);
|
||||||
|
#if (LIBTORRENT_VERSION_NUM >= 10204)
|
||||||
|
void handleSocks5Alert(const lt::socks5_alert *p) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
void createTorrentHandle(const lt::torrent_handle &nativeHandle);
|
void createTorrentHandle(const lt::torrent_handle &nativeHandle);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue