aboutsummaryrefslogtreecommitdiff
path: root/src/TcpTasks/Updater/onsynctickeraction.cpp
blob: 53214ce8703e9f775dbcd44b2392873d86c1b443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "syncupdater.h"

void SyncUpdater::onSyncTickerAction()
{
    // exists?
    if ( _syncIndex < _coreObject->Settings.SyncerSettings.syncServers.length() )
    {
        // retrieve sync settings from config
        SyncServer syncServ = _coreObject->Settings.SyncerSettings.syncServers.at(_syncIndex);
        _syncIndex++;

        // execute sync with remote masterserver
        new SyncClient(_coreObject, syncServ.remoteAddress, syncServ.listenPort);
    }
    else
    {
        // last entry. turn off timer
        _syncTicker.stop();
    }
}