Skip to content
Snippets Groups Projects
Commit 675eccdd authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

kill clients when finalizing onelab

parent 903f6a45
No related branches found
No related tags found
No related merge requests found
...@@ -1271,6 +1271,12 @@ void Msg::SetOnelabChanged(int value, const std::string &client) ...@@ -1271,6 +1271,12 @@ void Msg::SetOnelabChanged(int value, const std::string &client)
void Msg::FinalizeOnelab() void Msg::FinalizeOnelab()
{ {
#if defined(HAVE_ONELAB) #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){ if(_onelabClient){
delete _onelabClient; delete _onelabClient;
_onelabClient = 0; _onelabClient = 0;
......
...@@ -720,14 +720,24 @@ namespace onelab{ ...@@ -720,14 +720,24 @@ namespace onelab{
if(!done) done = _clear(name, client, _strings); if(!done) done = _clear(name, client, _strings);
} }
} }
bool set(const number &p, bool set(const number &p, const std::string &client="")
const std::string &client=""){ return _set(p, client, _numbers); } {
bool set(const string &p, return _set(p, client, _numbers);
const std::string &client=""){ return _set(p, client, _strings); } }
bool set(const string &p, const std::string &client="")
{
return _set(p, client, _strings);
}
bool get(std::vector<number> &ps, const std::string &name="", 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="", 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="") void getPtr(number **ptr, const std::string name, const std::string client="")
{ {
*ptr = _getPtr(name, client, _numbers); *ptr = _getPtr(name, client, _numbers);
...@@ -1228,10 +1238,14 @@ namespace onelab{ ...@@ -1228,10 +1238,14 @@ namespace onelab{
} }
virtual bool set(const number &p){ return _set(p); } virtual bool set(const number &p){ return _set(p); }
virtual bool set(const string &p){ return _set(p); } virtual bool set(const string &p){ return _set(p); }
virtual bool get(std::vector<number> &ps, virtual bool get(std::vector<number> &ps, const std::string &name="")
const std::string &name=""){ return _get(ps, name); } {
virtual bool get(std::vector<onelab::string> &ps, return _get(ps, name);
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) void sendInfo(const std::string &msg)
{ {
if(_gmshClient) _gmshClient->Info(msg.c_str()); if(_gmshClient) _gmshClient->Info(msg.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment