From 7f7031739048ad04cdb915b7e55995e0bb0b47c4 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 21 Mar 2013 19:18:41 +0000 Subject: [PATCH] clients of gmshLocalNetworkClient should also be gmshLocalNetworkClients --- Fltk/gmshLocalNetworkClient.h | 10 +++++----- Fltk/onelabGroup.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Fltk/gmshLocalNetworkClient.h b/Fltk/gmshLocalNetworkClient.h index 3af68cfb6a..aeabcc7b22 100644 --- a/Fltk/gmshLocalNetworkClient.h +++ b/Fltk/gmshLocalNetworkClient.h @@ -12,7 +12,7 @@ class gmshLocalNetworkClient : public onelab::localNetworkClient{ private: - std::vector<onelab::localNetworkClient*> _clients; + std::vector<gmshLocalNetworkClient*> _clients; public: gmshLocalNetworkClient(const std::string &name, const std::string &executable, const std::string &remoteLogin="") @@ -20,18 +20,18 @@ class gmshLocalNetworkClient : public onelab::localNetworkClient{ { addClient(this); } - void addClient(onelab::localNetworkClient *client) + void addClient(gmshLocalNetworkClient *client) { _clients.push_back(client); } - void removeClient(onelab::localNetworkClient *client) + void removeClient(gmshLocalNetworkClient *client) { - std::vector<onelab::localNetworkClient*>::iterator it; + std::vector<gmshLocalNetworkClient*>::iterator it; it = std::find(_clients.begin(), _clients.end(), client); if(it != _clients.end()) _clients.erase(it); } int getNumClients(){ return _clients.size(); } - onelab::localNetworkClient *getClient(int i) + gmshLocalNetworkClient *getClient(int i) { if(i >= 0 && i < getNumClients()) return _clients[i]; return 0; diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index 8110f930ca..c9eef194a4 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -401,7 +401,7 @@ bool gmshLocalNetworkClient::run() // subclients; in that case we might want to start from the one after the // one we read from last, for better load balancing) bool stop = false, haveData = false; - onelab::localNetworkClient *c = 0; + gmshLocalNetworkClient *c = 0; for(int i = 0; i < getNumClients(); i++){ if(getExecutable().empty() && !CTX::instance()->solver.listen){ // we stopped listening to the special "Listen" client @@ -435,7 +435,7 @@ bool gmshLocalNetworkClient::run() } } if(stop) break; - if(haveData && !receiveMessage()) break; + if(haveData && !c->receiveMessage()) break; if(c == this && c->getPid() < 0) break; } @@ -443,7 +443,7 @@ bool gmshLocalNetworkClient::run() // subclients, if any. We do not delete the servers when we disconnect to make // sure we always delete them, even when we disconnect "uncleanly" for(int i = 0; i < getNumClients(); i++){ - onelab::localNetworkClient *c = getClient(i); + gmshLocalNetworkClient *c = getClient(i); GmshServer *s = c->getGmshServer(); c->setGmshServer(0); if(s){ -- GitLab