From cf9a6f738676f19748571d85205bde6f26790912 Mon Sep 17 00:00:00 2001 From: prascle Date: Wed, 12 May 2004 13:58:52 +0000 Subject: [PATCH] PR: strings given in setProperties are set in environment in beginService --- src/Container/Component_i.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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: "<