]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
- Bu when using SALOME_BATCH
authorribes <ribes>
Fri, 23 May 2008 14:19:43 +0000 (14:19 +0000)
committerribes <ribes>
Fri, 23 May 2008 14:19:43 +0000 (14:19 +0000)
src/Container/SALOME_ContainerManager.cxx

index b3be8a826b49f3731519e0a3b390e8b4e233de60..fe6cc3165aa980628b1d7ea79473606aead85566 100644 (file)
@@ -508,9 +508,15 @@ GiveContainer(const Engines::MachineParameters& params,
   if(valenv)
     if (strcmp(valenv,"1")==0)
       {
-        if(_batchLaunchedContainers.empty())
-          fillBatchLaunchedContainers();
-        return *(_batchLaunchedContainersIter++);
+       if(_batchLaunchedContainers.empty())
+         fillBatchLaunchedContainers();
+
+       if (_batchLaunchedContainersIter == _batchLaunchedContainers.end())
+         _batchLaunchedContainersIter = _batchLaunchedContainers.begin();
+
+       Engines::Container_ptr rtn = Engines::Container::_duplicate(*_batchLaunchedContainersIter);
+       _batchLaunchedContainersIter++;
+        return rtn;
       }
   return StartContainer(params,policy,componentList);
 }