From: prascle Date: Wed, 12 May 2004 13:58:52 +0000 (+0000) Subject: PR: strings given in setProperties are set in environment in beginService X-Git-Tag: Ecole_Ete_a5~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cf9a6f738676f19748571d85205bde6f26790912;p=modules%2Fkernel.git PR: strings given in setProperties are set in environment in beginService --- diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index 309f7ef4a..cad8ba99c 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -32,6 +32,7 @@ using namespace std; #include "OpUtil.hxx" #include #include +#include #include "utilities.h" extern bool _Sleeping ; @@ -180,6 +181,22 @@ void Engines_Component_i::beginService(const char *serviceName) // MESSAGE(pthread_self() << " Return from BeginService for " << serviceName // << " ThreadId " << _ThreadId << " StartUsed " << _StartUsed // << " _graphName " << _graphName << " _nodeName " << _nodeName ); + + // --- for supervisor : all strings given with setProperties + // are set in environment + bool overwrite = true; + map::iterator it; + for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++) + { + std::string cle((*it).first); + if ((*it).second.type()->kind() == CORBA::tk_string) + { + const char* value; + (*it).second >>= value; + int ret = setenv(cle.c_str(), value, overwrite); + MESSAGE("--- setenv: "<