diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 1621cc1eb889b803bc5224974beefcefe4ffc9a6..d0db92abc8527a181f4be7275f4e4f23ee41ea9d 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -1271,6 +1271,12 @@ void Msg::SetOnelabChanged(int value, const std::string &client) void Msg::FinalizeOnelab() { #if defined(HAVE_ONELAB) + // kill any running clients + for(onelab::server::citer it = onelab::server::instance()->firstClient(); + it != onelab::server::instance()->lastClient(); it++){ + (*it)->kill(); + } + // delete local client if(_onelabClient){ delete _onelabClient; _onelabClient = 0; diff --git a/Common/onelab.h b/Common/onelab.h index 5d946c85441b5270c13fbbc3489954306bc68793..e0950bef6497e149c2667cf46f1639cf847bd020 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -720,14 +720,24 @@ namespace onelab{ if(!done) done = _clear(name, client, _strings); } } - bool set(const number &p, - const std::string &client=""){ return _set(p, client, _numbers); } - bool set(const string &p, - const std::string &client=""){ return _set(p, client, _strings); } + bool set(const number &p, const std::string &client="") + { + return _set(p, client, _numbers); + } + bool set(const string &p, const std::string &client="") + { + return _set(p, client, _strings); + } bool get(std::vector<number> &ps, const std::string &name="", - const std::string &client=""){ return _get(ps, name, client, _numbers); } + const std::string &client="") + { + return _get(ps, name, client, _numbers); + } bool get(std::vector<onelab::string> &ps, const std::string &name="", - const std::string &client=""){ return _get(ps, name, client, _strings); } + const std::string &client="") + { + return _get(ps, name, client, _strings); + } void getPtr(number **ptr, const std::string name, const std::string client="") { *ptr = _getPtr(name, client, _numbers); @@ -1228,10 +1238,14 @@ namespace onelab{ } virtual bool set(const number &p){ return _set(p); } virtual bool set(const string &p){ return _set(p); } - virtual bool get(std::vector<number> &ps, - const std::string &name=""){ return _get(ps, name); } - virtual bool get(std::vector<onelab::string> &ps, - const std::string &name=""){ return _get(ps, name); } + virtual bool get(std::vector<number> &ps, const std::string &name="") + { + return _get(ps, name); + } + virtual bool get(std::vector<onelab::string> &ps, const std::string &name="") + { + return _get(ps, name); + } void sendInfo(const std::string &msg) { if(_gmshClient) _gmshClient->Info(msg.c_str());