mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #600, turned CUrlList into a plain vanilla list
* bundled all load balancing in CFailoverUrlList. "Obtain" functions are non-const, no need of mutable members
This commit is contained in:
committed by
Mathew Sutcliffe
parent
89d9b3ad39
commit
1a1e4681fe
@@ -139,7 +139,7 @@ namespace BlackCore
|
||||
|
||||
void CSetupReader::ps_readSetup()
|
||||
{
|
||||
CUrl url(this->m_bootstrapUrls.getNextWorkingUrl());
|
||||
CUrl url(this->m_bootstrapUrls.obtainNextWorkingUrl());
|
||||
if (url.isEmpty())
|
||||
{
|
||||
CLogMessage(this).warning("Cannot read setup, failed URLs: %1") << this->m_bootstrapUrls.getFailedUrls();
|
||||
@@ -152,7 +152,7 @@ namespace BlackCore
|
||||
|
||||
void CSetupReader::ps_readUpdateInfo()
|
||||
{
|
||||
CUrl url(this->m_updateInfoUrls.getNextWorkingUrl());
|
||||
CUrl url(this->m_updateInfoUrls.obtainNextWorkingUrl());
|
||||
if (url.isEmpty())
|
||||
{
|
||||
CLogMessage(this).warning("Cannot read update info, failed URLs: %1") << this->m_updateInfoUrls.getFailedUrls();
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace BlackCore
|
||||
// round robin for load balancing
|
||||
// remark: Don't use QThread to run network operations in the background
|
||||
// see http://qt-project.org/doc/qt-4.7/qnetworkaccessmanager.html
|
||||
QUrl url(m_setup.get().vatsimDataFileUrls().getNextUrl());
|
||||
QUrl url(m_setup.get().vatsimDataFileUrls().getRandomUrl());
|
||||
if (url.isEmpty()) { return; }
|
||||
Q_ASSERT_X(this->m_networkManager, Q_FUNC_INFO, "Missing network manager");
|
||||
QNetworkRequest request(url);
|
||||
|
||||
Reference in New Issue
Block a user