From b396ca771d3cab931f63af10365210f21b9c03c3 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 30 Apr 2018 12:27:57 +0800 Subject: [PATCH] Fix displayed tracker messages Before this change, we were displaying debug messages constructed by libtorrent, now we show messages returned by trackers. Closes #8739. --- src/base/bittorrent/torrenthandle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 6bb19db00..bc7cf1318 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -1509,7 +1509,7 @@ void TorrentHandle::handleTrackerWarningAlert(const libtorrent::tracker_warning_ const QString message = QString::fromStdString(p->msg); #else const QString trackerUrl = p->tracker_url(); - const QString message = QString::fromStdString(p->message()); + const QString message = p->warning_message(); #endif // Connection was successful now but there is a warning message @@ -1525,7 +1525,7 @@ void TorrentHandle::handleTrackerErrorAlert(const libtorrent::tracker_error_aler const QString message = QString::fromStdString(p->msg); #else const QString trackerUrl = p->tracker_url(); - const QString message = QString::fromStdString(p->message()); + const QString message = p->error_message(); #endif m_trackerInfos[trackerUrl].lastMessage = message;