Browse Source

SMTP: Fix finding the local address.

adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
a708c642ef
  1. 2
      src/smtp.cpp

2
src/smtp.cpp

@ -84,7 +84,7 @@ QByteArray determineLocalAddress() @@ -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)))

Loading…
Cancel
Save