|
@@ -20,6 +20,8 @@ along with this program. If not, see < http://www.gnu.org/licenses/ >.
|
|
|
#include "SshClient.h"
|
|
|
#include "App.h"
|
|
|
#include "Settings.h"
|
|
|
+#include "ActiveClient.h"
|
|
|
+
|
|
|
#include <QProcess>
|
|
|
#include <QRegExp>
|
|
|
#include <QDateTime>
|
|
@@ -266,13 +268,8 @@ void SshClient::parse(const QDateTime &time, const QString &command, const QStri
|
|
|
if(command == "REQ_ASSIGNMENTS")
|
|
|
{
|
|
|
myApp->print("Server list requested... Sending it now!\n");
|
|
|
- // TODO: Maybe fetching server data directly from ActiveClients list is a better idea
|
|
|
- Settings::ServerList serverList = Settings::globalInstance()->serverList();
|
|
|
- Settings::Server server;
|
|
|
- foreach(server, serverList)
|
|
|
- {
|
|
|
- // Let the reply be send after the pinging is done
|
|
|
- Pinger* pinger = new Pinger(QHostAddress(server.address), server.port, this);
|
|
|
+ foreach (ActiveClient* ac, myApp->clients()) {
|
|
|
+ Pinger* pinger = new Pinger(ac->address(), ac->port(), this);
|
|
|
connect(pinger, SIGNAL(finished(QHostAddress,quint16,int)), SLOT(assignmentsReply(QHostAddress,quint16,int)));
|
|
|
pinger->ping();
|
|
|
}
|