From e965f95cdecfa446c39ba652a345d98bedbb9998 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 5 Sep 2012 19:33:54 +0000 Subject: [PATCH] fix for local onelab client --- Common/CommandLine.cpp | 4 ++++ Common/GmshMessage.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index f27a718474..e718d900b2 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -151,6 +151,10 @@ void GetOptions(int argc, char *argv[]) Msg::InitializeOnelab(argv[i], argv[i + 1]); i += 2; } + else if(argv[i]){ + Msg::InitializeOnelab(argv[i], ""); + i += 1; + } else Msg::Fatal("Missing client name and/or address of OneLab server"); } diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 0de083e5fe..c3485057d9 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -635,8 +635,10 @@ void Msg::InitializeOnelab(const std::string &name, const std::string &sockname) { #if defined(HAVE_ONELAB) if(_onelabClient) delete _onelabClient; - if(sockname.empty()) - _onelabClient = new onelab::localClient(name); + if(sockname.empty()){ + _onelabClient = new onelab::localClient("Gmsh"); + _onelabClient->fromFile(name); + } else{ onelab::remoteNetworkClient *c = new onelab::remoteNetworkClient(name, sockname); _onelabClient = c; @@ -661,7 +663,6 @@ void Msg::InitializeOnelab(const std::string &name, const std::string &sockname) //Info("Performing OneLab '%s'", ps[0].getValue().c_str()); if(ps[0].getValue() == "initialize") Exit(0); } - } #endif } -- GitLab