Browse Source

Merge pull request #11250 from Chocobo1/warning

Improve error messages for url_seed_alert
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
3971bf2d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      src/base/bittorrent/session.cpp

15
src/base/bittorrent/session.cpp

@ -4163,9 +4163,20 @@ void Session::handlePeerBanAlert(const lt::peer_ban_alert *p) @@ -4163,9 +4163,20 @@ void Session::handlePeerBanAlert(const lt::peer_ban_alert *p)
void Session::handleUrlSeedAlert(const lt::url_seed_alert *p)
{
LogMsg(tr("URL seed lookup failed for URL: '%1', message: %2")
.arg(QString::fromStdString(p->server_url()), QString::fromStdString(p->message()))
const TorrentHandle *torrent = m_torrents.value(p->handle.info_hash());
if (!torrent)
return;
if (p->error) {
LogMsg(tr("URL seed name lookup failed. Torrent: \"%1\". URL: \"%2\". Error: \"%3\"")
.arg(torrent->name(), p->server_url(), QString::fromStdString(p->message()))
, Log::WARNING);
}
else {
LogMsg(tr("Received error message from a URL seed. Torrent: \"%1\". URL: \"%2\". Message: \"%3\"")
.arg(torrent->name(), p->server_url(), p->error_message())
, Log::WARNING);
}
}
void Session::handleListenSucceededAlert(const lt::listen_succeeded_alert *p)

Loading…
Cancel
Save