]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: patches from A.Geay
authorprascle <prascle>
Tue, 25 Jan 2005 09:44:08 +0000 (09:44 +0000)
committerprascle <prascle>
Tue, 25 Jan 2005 09:44:08 +0000 (09:44 +0000)
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/ResourcesManager/SALOME_ResourcesManager.cxx

index 744229cc7a940a08182a8a774ed36660a9133a01..4b110ce6b7d0db3032872d5257d618e4091fe2d0 100644 (file)
@@ -172,6 +172,16 @@ Engines::Component_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component
   char *stContainer=strdup(containerName);
   string st2Container(stContainer);
   int rg=st2Container.find("/");
+  if(rg>=0)
+    {
+      stContainer[rg]='\0';
+      if(strcmp(stContainer,"localhost")==0)
+       {
+         Engines::Component_ptr ret=FindOrLoad_Component(stContainer+rg+1,componentName);
+         free(stContainer);
+         return ret;
+       }
+    }
   if(rg<0) {
     //containerName doesn't contain "/" => Local container
     free(stContainer);
index 3742f2f83348079087fbe112c683fe2fe19c053d..7765c78299657926f01549bc1043840612292cc0 100644 (file)
@@ -9,6 +9,7 @@
 #include <unistd.h>
 #include <fstream>
 #include <iostream>
+#include <string.h>
 #include <map>
 
 #include <sys/types.h>
@@ -202,7 +203,7 @@ string SALOME_ResourcesManager::BuildTempFileToLaunchRemoteContainer(const strin
     tempOutputFile << "SALOME_Container ";
   tempOutputFile << containerName << " -";
   AddOmninamesParams(tempOutputFile);
-  tempOutputFile << " > /tmp/" << containerName << "_" << machine << ".log 2>&1 &" << endl;//" &" << endl;
+  tempOutputFile << " > /tmp/" << "/" << containerName << "_" << machine << ".log 2>&1 &" << endl;//" &" << endl;
   //tempOutputFile << "EOF" << endl;
   //tempOutputFile << "&" << endl;
   tempOutputFile.flush();
@@ -359,7 +360,15 @@ void SALOME_ResourcesManager::AddOmninamesParams(ofstream& fileStream) const
 string SALOME_ResourcesManager::BuildTemporaryFileName() const
 {
   //build more complex file name to support multiple salome session
-  return "/tmp/command.sh";
+  string command( "/tmp/" );
+  char *temp=new char[14];
+  strcpy(temp,"command");
+  strcat(temp,"XXXXXX");
+  mkstemp(temp);
+  command += temp;
+  delete [] temp;
+  command += ".sh";
+  return command;
 }