Browse Source

Revert "Guard the flag used for deferred session configure." (#6733)

This reverts commit 5cbc7b16c0.
adaptive-webui-19844
Vladimir Golovnev 8 years ago committed by GitHub
parent
commit
c1e3e2a745
  1. 13
      src/base/bittorrent/session.cpp
  2. 3
      src/base/bittorrent/session.h

13
src/base/bittorrent/session.cpp

@ -873,9 +873,6 @@ void Session::adjustLimits() @@ -873,9 +873,6 @@ void Session::adjustLimits()
void Session::configure()
{
qDebug("Configuring session");
if (!m_deferredConfigureScheduled) return; // Obtaining the lock is expensive, let's check early
QWriteLocker locker(&m_lock);
if (!m_deferredConfigureScheduled) return; // something might have changed while we were getting the lock
#if LIBTORRENT_VERSION_NUM < 10100
libt::session_settings sessionSettings = m_nativeSession->settings();
configure(sessionSettings);
@ -3029,12 +3026,10 @@ void Session::initResumeFolder() @@ -3029,12 +3026,10 @@ void Session::initResumeFolder()
void Session::configureDeferred()
{
if (m_deferredConfigureScheduled) return; // Obtaining the lock is expensive, let's check early
QWriteLocker locker(&m_lock);
if (m_deferredConfigureScheduled) return; // something might have changed while we were getting the lock
QMetaObject::invokeMethod(this, "configure", Qt::QueuedConnection);
m_deferredConfigureScheduled = true;
if (!m_deferredConfigureScheduled) {
QMetaObject::invokeMethod(this, "configure", Qt::QueuedConnection);
m_deferredConfigureScheduled = true;
}
}
// Enable IP Filtering

3
src/base/bittorrent/session.h

@ -41,7 +41,6 @@ @@ -41,7 +41,6 @@
#endif
#include <QNetworkConfigurationManager>
#include <QPointer>
#include <QReadWriteLock>
#include <QStringList>
#include <QVector>
#include <QWaitCondition>
@ -603,8 +602,6 @@ namespace BitTorrent @@ -603,8 +602,6 @@ namespace BitTorrent
QNetworkConfigurationManager m_networkManager;
mutable QReadWriteLock m_lock;
static Session *m_instance;
};
}

Loading…
Cancel
Save