]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
- Parallel and sequential have the behaviour
authorribes <ribes>
Tue, 25 Sep 2007 12:13:08 +0000 (12:13 +0000)
committerribes <ribes>
Tue, 25 Sep 2007 12:13:08 +0000 (12:13 +0000)
src/Container/Component_i.cxx
src/ParallelContainer/SALOME_ParallelComponent_i.cxx

index 6499555b36992d1c2a3c936893cfec8371f30342..2e48756111fc0b07473a154453574a2acbe8935c 100644 (file)
@@ -881,16 +881,8 @@ Engines_Component_i::setInputFileToService(const char* service_name,
     Sfile->setContainer(Engines::Container::_duplicate(container));
     (*_map)[Salome_file_name] = Sfile;
   }
-  else {
-    // Salome_file_name already added into the service
-    // throw Exception
-    SALOME::ExceptionStruct es;
-    es.type = SALOME::INTERNAL_ERROR;
-    es.text = "Salome_file_name already added";
-    throw SALOME::SALOME_Exception(es);
-  }
-  Salome_file_i * Sfile = (*_map)[Salome_file_name];
 
+  Salome_file_i * Sfile = (*_map)[Salome_file_name];
   return Sfile->_this();
 }
 
@@ -958,16 +950,8 @@ Engines_Component_i::setOutputFileToService(const char* service_name,
     Sfile->setContainer(Engines::Container::_duplicate(container));
     (*_map)[Salome_file_name] = Sfile;
   }
-  else {
-    // Salome_file_name already added into the service
-    // throw Exception
-    SALOME::ExceptionStruct es;
-    es.type = SALOME::INTERNAL_ERROR;
-    es.text = "Salome_file_name already added";
-    throw SALOME::SALOME_Exception(es);
-  }
-  Salome_file_i * Sfile = (*_map)[Salome_file_name];
 
+  Salome_file_i * Sfile = (*_map)[Salome_file_name];
   return Sfile->_this();
 }
 
index 4daf505a421dfea6690f8817ba15f6a8e22f0437..94642389004561f79bd92db26510b2b848cf2ee1 100644 (file)
@@ -879,17 +879,8 @@ Engines_Parallel_Component_i::setInputFileToService(const char* service_name,
     _proxy = NULL;
     pthread_mutex_unlock(deploy_mutex);
   }
-  else {
-    // Salome_file_name already added into the service
-    // throw Exception
-    SALOME::ExceptionStruct es;
-    es.type = SALOME::INTERNAL_ERROR;
-    es.text = "Salome_file_name already added";
-    throw SALOME::SALOME_Exception(es);
-  }
 
-  CORBA::Object_ptr obj = _orb->string_to_object(proxy_ior.c_str());
-  return Engines::Salome_file::_narrow(obj);
+  return (*_proxy_map)[Salome_file_name]->_this();
 }
 
 Engines::Salome_file_ptr 
@@ -986,17 +977,8 @@ Engines_Parallel_Component_i::setOutputFileToService(const char* service_name,
     _proxy = NULL;
     pthread_mutex_unlock(deploy_mutex);
   }
-  else {
-    // Salome_file_name already added into the service
-    // throw Exception
-    SALOME::ExceptionStruct es;
-    es.type = SALOME::INTERNAL_ERROR;
-    es.text = "Salome_file_name already added";
-    throw SALOME::SALOME_Exception(es);
-  }
 
-  CORBA::Object_ptr obj = _orb->string_to_object(proxy_ior.c_str());
-  return Engines::Salome_file::_narrow(obj);
+  return (*_proxy_map)[Salome_file_name]->_this();
 }
 
 Engines::Salome_file_ptr