From ff789fc493cfcb0fd438b38844c9a529758ff339 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 13 Oct 2013 23:08:55 +0300 Subject: [PATCH] Show external IP in the log. Closes #968. --- src/qtlibtorrent/qbtsession.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index c65353287..da16f9958 100755 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -2634,6 +2634,10 @@ void QBtSession::readAlerts() { } } } + else if (external_ip_alert *p = dynamic_cast(a.get())) { + boost::system::error_code ec; + addConsoleMessage(tr("External IP: %1", "e.g. External IP: 192.168.0.1").arg(p->external_address.to_string(ec).c_str()), "blue"); + } } catch (const std::exception& e) { qWarning() << "Caught exception in readAlerts(): " << e.what(); }