Browse Source

Merge pull request #12430 from rwasef1830/add-outgoing-interfaces

Fix outgoing interfaces not getting assigned in case addr is not null.
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
f58f425175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/base/bittorrent/session.cpp

7
src/base/bittorrent/session.cpp

@ -1533,10 +1533,11 @@ void Session::configureNetworkInterfaces(lt::settings_pack &settingsPack) @@ -1533,10 +1533,11 @@ void Session::configureNetworkInterfaces(lt::settings_pack &settingsPack)
for (const QString &ip : asConst(getListeningIPs())) {
const QHostAddress addr {ip};
if (!addr.isNull()) {
endpoints << ((addr.protocol() == QAbstractSocket::IPv6Protocol)
const QString ip = ((addr.protocol() == QAbstractSocket::IPv6Protocol)
? ('[' + Utils::Net::canonicalIPv6Addr(addr).toString() + ']')
: addr.toString())
+ portString;
: addr.toString());
endpoints << (ip + portString);
outgoingInterfaces << ip;
}
else {
// ip holds an interface name

Loading…
Cancel
Save