|
|
@ -5371,6 +5371,9 @@ void SessionImpl::handleAlert(const lt::alert *a) |
|
|
|
case lt::state_update_alert::alert_type: |
|
|
|
case lt::state_update_alert::alert_type: |
|
|
|
handleStateUpdateAlert(static_cast<const lt::state_update_alert *>(a)); |
|
|
|
handleStateUpdateAlert(static_cast<const lt::state_update_alert *>(a)); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case lt::session_error_alert::alert_type: |
|
|
|
|
|
|
|
handleSessionErrorAlert(static_cast<const lt::session_error_alert *>(a)); |
|
|
|
|
|
|
|
break; |
|
|
|
case lt::session_stats_alert::alert_type: |
|
|
|
case lt::session_stats_alert::alert_type: |
|
|
|
handleSessionStatsAlert(static_cast<const lt::session_stats_alert *>(a)); |
|
|
|
handleSessionStatsAlert(static_cast<const lt::session_stats_alert *>(a)); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -5431,6 +5434,9 @@ void SessionImpl::handleAlert(const lt::alert *a) |
|
|
|
case lt::socks5_alert::alert_type: |
|
|
|
case lt::socks5_alert::alert_type: |
|
|
|
handleSocks5Alert(static_cast<const lt::socks5_alert *>(a)); |
|
|
|
handleSocks5Alert(static_cast<const lt::socks5_alert *>(a)); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case lt::i2p_alert::alert_type: |
|
|
|
|
|
|
|
handleI2PAlert(static_cast<const lt::i2p_alert *>(a)); |
|
|
|
|
|
|
|
break; |
|
|
|
#ifdef QBT_USES_LIBTORRENT2 |
|
|
|
#ifdef QBT_USES_LIBTORRENT2 |
|
|
|
case lt::torrent_conflict_alert::alert_type: |
|
|
|
case lt::torrent_conflict_alert::alert_type: |
|
|
|
handleTorrentConflictAlert(static_cast<const lt::torrent_conflict_alert *>(a)); |
|
|
|
handleTorrentConflictAlert(static_cast<const lt::torrent_conflict_alert *>(a)); |
|
|
@ -5737,6 +5743,12 @@ void SessionImpl::handleExternalIPAlert(const lt::external_ip_alert *p) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SessionImpl::handleSessionErrorAlert(const lt::session_error_alert *p) const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LogMsg(tr("BitTorrent session encountered a serious error. Reason: \"%1\"") |
|
|
|
|
|
|
|
.arg(QString::fromStdString(p->message())), Log::CRITICAL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SessionImpl::handleSessionStatsAlert(const lt::session_stats_alert *p) |
|
|
|
void SessionImpl::handleSessionStatsAlert(const lt::session_stats_alert *p) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (m_refreshEnqueued) |
|
|
|
if (m_refreshEnqueued) |
|
|
@ -5931,6 +5943,15 @@ void SessionImpl::handleSocks5Alert(const lt::socks5_alert *p) const |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SessionImpl::handleI2PAlert(const lt::i2p_alert *p) const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (p->error) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LogMsg(tr("I2P error. Message: \"%1\".") |
|
|
|
|
|
|
|
.arg(QString::fromStdString(p->message())), Log::WARNING); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SessionImpl::handleTrackerAlert(const lt::tracker_alert *a) |
|
|
|
void SessionImpl::handleTrackerAlert(const lt::tracker_alert *a) |
|
|
|
{ |
|
|
|
{ |
|
|
|
TorrentImpl *torrent = m_torrents.value(a->handle.info_hash()); |
|
|
|
TorrentImpl *torrent = m_torrents.value(a->handle.info_hash()); |
|
|
|