Skip to content
Snippets Groups Projects
Commit 3bea4006 authored by Maxime Graulich's avatar Maxime Graulich
Browse files

No commit message

No commit message
parent 3804d2c6
No related branches found
No related tags found
No related merge requests found
......@@ -786,6 +786,10 @@ public:
void Msg::InitializeOnelab(const std::string &name, const std::string &sockname)
{
#ifdef HAVE_ONELAB2
if(_onelabClient) {
delete _onelabClient;
_onelabClient = 0;
}
if(sockname.empty()){
if(name != "Gmsh"){ // load db from file:
FILE *fp = Fopen(name.c_str(), "rb");
......@@ -805,7 +809,7 @@ void Msg::InitializeOnelab(const std::string &name, const std::string &sockname)
address = ip4_inet_pton(sockname.substr(0,colon).c_str());
port = atoi(sockname.substr(colon+1).c_str());
}
GmshNetworkClient *c = OnelabDatabase::instance()->useAsNetworkClient(address, port, "Gmsh");
GmshNetworkClient *c = OnelabDatabase::instance()->useAsNetworkClient(address, port, name);
if(c == NULL) {
Error("Unable to connect ONELAB server");
Exit(1);
......
......@@ -87,8 +87,8 @@ public:
}
std::map<std::string, bool> clients = p.getClients();
for(std::map<std::string, bool>::const_iterator it = clients.begin(); it != clients.end(); it++) {
std::cout << "send " << p.getName() << " to " << it->first << " from " << client << std::endl;
if(it->first == client) continue;
std::cout << "send " << p.getName() << " to " << it->first << " from " << client << std::endl;
OnelabLocalNetworkClient *tmp = getClient(it->first);
if(tmp == NULL) continue;
tmp->updateParameter(pp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment