From: ribes Date: Tue, 25 Sep 2007 12:13:08 +0000 (+0000) Subject: - Parallel and sequential have the behaviour X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=74481e8acbe8875c3e499843efb5d62dc25d3655;p=modules%2Fkernel.git - Parallel and sequential have the behaviour --- diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index 6499555b3..2e4875611 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -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(); } diff --git a/src/ParallelContainer/SALOME_ParallelComponent_i.cxx b/src/ParallelContainer/SALOME_ParallelComponent_i.cxx index 4daf505a4..946423890 100644 --- a/src/ParallelContainer/SALOME_ParallelComponent_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelComponent_i.cxx @@ -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