X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fyacsloader%2FserverParsers.hxx;h=bf6ceb08b6dbcfe9b7633bf0f814fc8278ec4c93;hb=c9208a8ef7f32a620d9650908588320ff159a167;hp=2c9602e9c66c9275a5a6b4729d73cf2abe38b77e;hpb=c81be9b5e74b26e207bd6efd0ccf68418ac536a3;p=modules%2Fyacs.git diff --git a/src/yacsloader/serverParsers.hxx b/src/yacsloader/serverParsers.hxx index 2c9602e9c..bf6ceb08b 100644 --- a/src/yacsloader/serverParsers.hxx +++ b/src/yacsloader/serverParsers.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2006-2012 CEA/DEN, EDF R&D +// Copyright (C) 2006-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -68,10 +68,18 @@ struct servertypeParser:public inlinetypeParser { DEBTRACE( "server_loadcontainer: " << name ) this->_node=(YACS::ENGINE::ServerNode*)theRuntime->createFuncNode("DistPython",this->_name); - YACS::ENGINE::Container *cont=currentProc->createContainer(this->_node->getEffectiveKindOfServer()); - cont->setName(name); - this->_node->setContainer(cont); - cont->decrRef(); + std::map::const_iterator it(currentProc->containerMap.find(name)); + if(it!=currentProc->containerMap.end()) + { + this->_node->setContainer((*it).second); + } + else + { + YACS::ENGINE::Container *cont=currentProc->createContainer(this->_node->getEffectiveKindOfServer()); + cont->setName(name); + this->_node->setContainer(cont); + cont->decrRef(); + } } virtual void script (const myfunc& f) {