From ea5dfd19028055a4958b6ee1904e8be69bf9581a Mon Sep 17 00:00:00 2001 From: prascle Date: Tue, 24 Oct 2006 17:13:07 +0000 Subject: [PATCH] PR: From Antony GEAY : non regression (2.2.x) on launch remote container without SALOME APPLICATION configuration --- src/Container/SALOME_Container.cxx | 2 +- .../SALOME_ResourcesManager.cxx | 31 +++++++------------ 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index 0415c2141..c5b7c15e2 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) //CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ; ORB_INIT &init = *SINGLETON_::Instance() ; ASSERT(SINGLETON_::IsAlreadyExisting()); - CORBA::ORB_ptr orb = init(0 , 0 ) ; + CORBA::ORB_ptr orb = init(argc , argv ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); INFOS_COMPILATION; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 992b565f7..46e27dbc4 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -707,24 +707,8 @@ void SALOME_ResourcesManager::AddOmninamesParams(string& command) const void SALOME_ResourcesManager::AddOmninamesParams(ofstream& fileStream) const { - string omniORBcfg( getenv( "OMNIORB_CONFIG" ) ) ; - ifstream omniORBfile( omniORBcfg.c_str() ) ; - char ORBInitRef[11] ; - char egal[3] ; - char nameservice[132] ; - omniORBfile >> ORBInitRef ; - fileStream << "ORBInitRef "; - omniORBfile >> egal ; - omniORBfile >> nameservice ; - omniORBfile.close() ; - char * bsn = strchr( nameservice , '\n' ) ; - - if ( bsn ) - { - bsn[ 0 ] = '\0' ; - } - - fileStream << nameservice; + fileStream << "ORBInitRef NameService="; + fileStream << _NS->getIORaddr(); } @@ -870,7 +854,16 @@ SALOME_ResourcesManager::BuildTempFileToLaunchRemoteContainer } else if (resInfo.Protocol == ssh) - command = "ssh "; + { + command = "ssh "; + string commandRcp = "scp "; + commandRcp += _TmpFileName; + commandRcp += " "; + commandRcp += machine; + commandRcp += ":"; + commandRcp += _TmpFileName; + system(commandRcp.c_str()); + } else throw SALOME_Exception("Unknown protocol"); -- 2.39.2