|
|
@ -923,12 +923,12 @@ void Session::configureComponents() |
|
|
|
|
|
|
|
|
|
|
|
configurePeerClasses(); |
|
|
|
configurePeerClasses(); |
|
|
|
|
|
|
|
|
|
|
|
if (m_IPFilteringChanged) { |
|
|
|
if (!m_IPFilteringConfigured) { |
|
|
|
if (isIPFilteringEnabled()) |
|
|
|
if (isIPFilteringEnabled()) |
|
|
|
enableIPFilter(); |
|
|
|
enableIPFilter(); |
|
|
|
else |
|
|
|
else |
|
|
|
disableIPFilter(); |
|
|
|
disableIPFilter(); |
|
|
|
m_IPFilteringChanged = false; |
|
|
|
m_IPFilteringConfigured = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1120,7 +1120,7 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack) |
|
|
|
#ifdef Q_OS_WIN |
|
|
|
#ifdef Q_OS_WIN |
|
|
|
QString chosenIP; |
|
|
|
QString chosenIP; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if (m_listenInterfaceChanged) { |
|
|
|
if (!m_listenInterfaceConfigured) { |
|
|
|
const int port = useRandomPort() ? 0 : this->port(); |
|
|
|
const int port = useRandomPort() ? 0 : this->port(); |
|
|
|
if (port > 0) // user specified port
|
|
|
|
if (port > 0) // user specified port
|
|
|
|
settingsPack.set_int(lt::settings_pack::max_retry_port_bind, 0); |
|
|
|
settingsPack.set_int(lt::settings_pack::max_retry_port_bind, 0); |
|
|
@ -1176,7 +1176,7 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack) |
|
|
|
settingsPack.set_str(lt::settings_pack::outgoing_interfaces, networkInterface().toStdString()); |
|
|
|
settingsPack.set_str(lt::settings_pack::outgoing_interfaces, networkInterface().toStdString()); |
|
|
|
#endif // Q_OS_WIN
|
|
|
|
#endif // Q_OS_WIN
|
|
|
|
|
|
|
|
|
|
|
|
m_listenInterfaceChanged = false; |
|
|
|
m_listenInterfaceConfigured = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
applyBandwidthLimits(settingsPack); |
|
|
|
applyBandwidthLimits(settingsPack); |
|
|
@ -2369,7 +2369,7 @@ QStringList Session::getListeningIPs() const |
|
|
|
// the BitTorrent session will listen to
|
|
|
|
// the BitTorrent session will listen to
|
|
|
|
void Session::configureListeningInterface() |
|
|
|
void Session::configureListeningInterface() |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_listenInterfaceChanged = true; |
|
|
|
m_listenInterfaceConfigured = false; |
|
|
|
configureDeferred(); |
|
|
|
configureDeferred(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2695,7 +2695,7 @@ void Session::setIPFilteringEnabled(const bool enabled) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (enabled != m_isIPFilteringEnabled) { |
|
|
|
if (enabled != m_isIPFilteringEnabled) { |
|
|
|
m_isIPFilteringEnabled = enabled; |
|
|
|
m_isIPFilteringEnabled = enabled; |
|
|
|
m_IPFilteringChanged = true; |
|
|
|
m_IPFilteringConfigured = false; |
|
|
|
configureDeferred(); |
|
|
|
configureDeferred(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2710,7 +2710,7 @@ void Session::setIPFilterFile(QString path) |
|
|
|
path = Utils::Fs::toUniformPath(path); |
|
|
|
path = Utils::Fs::toUniformPath(path); |
|
|
|
if (path != IPFilterFile()) { |
|
|
|
if (path != IPFilterFile()) { |
|
|
|
m_IPFilterFile = path; |
|
|
|
m_IPFilterFile = path; |
|
|
|
m_IPFilteringChanged = true; |
|
|
|
m_IPFilteringConfigured = false; |
|
|
|
configureDeferred(); |
|
|
|
configureDeferred(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2744,7 +2744,7 @@ void Session::setBannedIPs(const QStringList &newList) |
|
|
|
// also here we have to recreate filter list including 3rd party ban file
|
|
|
|
// also here we have to recreate filter list including 3rd party ban file
|
|
|
|
// and install it again into m_session
|
|
|
|
// and install it again into m_session
|
|
|
|
m_bannedIPs = filteredList; |
|
|
|
m_bannedIPs = filteredList; |
|
|
|
m_IPFilteringChanged = true; |
|
|
|
m_IPFilteringConfigured = false; |
|
|
|
configureDeferred(); |
|
|
|
configureDeferred(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|