mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
SMTP: Fix finding the local address.
This commit is contained in:
parent
487ca568b8
commit
a708c642ef
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ QByteArray determineLocalAddress()
|
||||||
const bool listen_ipv6 = pref->getListenIPv6();
|
const bool listen_ipv6 = pref->getListenIPv6();
|
||||||
QByteArray address = "127.0.0.1";
|
QByteArray address = "127.0.0.1";
|
||||||
|
|
||||||
if (address.isEmpty()) {
|
if (iface_name.isEmpty()) {
|
||||||
foreach (const QHostAddress& addr, QNetworkInterface::allAddresses()) {
|
foreach (const QHostAddress& addr, QNetworkInterface::allAddresses()) {
|
||||||
if (addr == QHostAddress::LocalHost || addr == QHostAddress::LocalHostIPv6
|
if (addr == QHostAddress::LocalHost || addr == QHostAddress::LocalHostIPv6
|
||||||
|| (!listen_ipv6 && (addr.protocol() == QAbstractSocket::IPv6Protocol)))
|
|| (!listen_ipv6 && (addr.protocol() == QAbstractSocket::IPv6Protocol)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue