From a708c642ef486a34ad1f269edd634dd5d6ef7e84 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Tue, 2 Sep 2014 14:25:54 +0300 Subject: [PATCH] SMTP: Fix finding the local address. --- src/smtp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smtp.cpp b/src/smtp.cpp index 027f5aca6..b51a91d19 100644 --- a/src/smtp.cpp +++ b/src/smtp.cpp @@ -84,7 +84,7 @@ QByteArray determineLocalAddress() const bool listen_ipv6 = pref->getListenIPv6(); QByteArray address = "127.0.0.1"; - if (address.isEmpty()) { + if (iface_name.isEmpty()) { foreach (const QHostAddress& addr, QNetworkInterface::allAddresses()) { if (addr == QHostAddress::LocalHost || addr == QHostAddress::LocalHostIPv6 || (!listen_ipv6 && (addr.protocol() == QAbstractSocket::IPv6Protocol)))