From d75fd3fcde8d4cc1c7ddb1ebeaf56791ddd5e3c8 Mon Sep 17 00:00:00 2001 From: Hanabishi <13597663+HanabishiRecca@users.noreply.github.com> Date: Sat, 18 Feb 2023 10:14:27 +0500 Subject: [PATCH] Show filtered port numbers in logs PR #18544. --- src/base/bittorrent/sessionimpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index 23a6bde76..45dea93ad 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -5529,13 +5529,13 @@ void SessionImpl::handlePeerBlockedAlert(const lt::peer_blocked_alert *p) reason = tr("IP filter", "this peer was blocked. Reason: IP filter."); break; case lt::peer_blocked_alert::port_filter: - reason = tr("port filter", "this peer was blocked. Reason: port filter."); + reason = tr("filtered port (%1)", "this peer was blocked. Reason: filtered port (8899).").arg(QString::number(p->endpoint.port())); break; case lt::peer_blocked_alert::i2p_mixed: reason = tr("%1 mixed mode restrictions", "this peer was blocked. Reason: I2P mixed mode restrictions.").arg(u"I2P"_qs); // don't translate I2P break; case lt::peer_blocked_alert::privileged_ports: - reason = tr("use of privileged port", "this peer was blocked. Reason: use of privileged port."); + reason = tr("privileged port (%1)", "this peer was blocked. Reason: privileged port (80).").arg(QString::number(p->endpoint.port())); break; case lt::peer_blocked_alert::utp_disabled: reason = tr("%1 is disabled", "this peer was blocked. Reason: uTP is disabled.").arg(C_UTP); // don't translate μTP