From f663defae94e1e4526a82f9b7d4a89a1f6778a0f Mon Sep 17 00:00:00 2001 From: ribes Date: Wed, 25 Mar 2009 15:03:59 +0000 Subject: [PATCH] =?utf8?q?-=20Correction=20lors=20de=20la=20destruction=20?= =?utf8?q?des=20ports=20DSC=20parall=C3=83=C2=A8le=20=20=20-=20On=20fait?= =?utf8?q?=20=5Fremove=5Fref=20et=20c'est=20le=20poa=20qui=20les=20d=C3=83?= =?utf8?q?=C2=A9truit=20=C3=83=C2=A0=20la=20fin?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx | 1 + src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx | 7 ++++--- src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx | 2 +- .../SALOME_ParallelContainerNodeDummy.cxx | 7 +++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx index 2ea3c6637..25009cbf1 100644 --- a/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx +++ b/src/DSC/ParallelDSC/Param_Double_Port_provides_i.cxx @@ -173,6 +173,7 @@ Param_Double_Port_provides_i::init_port(Engines_ParallelDSC_i * par_compo, if (i == rank) { std::cerr << "Adding node of processor : " << i << std::endl; par_compo->add_parallel_provides_node_port(Ports::Port_PaCO::_narrow(port->_this()), port_name.c_str()); + port->_remove_ref(); } com->paco_barrier(); } diff --git a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx index e4f2b72f1..960445e9e 100644 --- a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx +++ b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.cxx @@ -28,6 +28,9 @@ Param_Double_Port_uses_i::Param_Double_Port_uses_i(Engines_ParallelDSC_i * par_c { _orb = CORBA::ORB::_duplicate(orb); _fake_properties = new PortProperties_i(); + _fake_prop_ref = _fake_properties->_this(); + _fake_properties->_remove_ref(); + _par_compo = par_compo; _port_name = port_name; _provides_port = NULL; @@ -40,8 +43,6 @@ Param_Double_Port_uses_i::Param_Double_Port_uses_i(Engines_ParallelDSC_i * par_c Param_Double_Port_uses_i::~Param_Double_Port_uses_i() { - if (_fake_properties) - delete _fake_properties; if (_provides_port) { _provides_port->stop(); @@ -54,7 +55,7 @@ Param_Double_Port_uses_i::add_port_to_component() { _par_compo->add_uses_port("IDL:Ports/Param_Double_Port:1.0", _port_name.c_str(), - _fake_properties->_this()); + _fake_prop_ref); } void diff --git a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx index 48bbe04e1..fa2e725d7 100644 --- a/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx +++ b/src/DSC/ParallelDSC/Param_Double_Port_uses_i.hxx @@ -55,7 +55,7 @@ class Param_Double_Port_uses_i Engines_ParallelDSC_i * _par_compo; Ports::Param_Double_Port_var _proxy_port; PortProperties_i * _fake_properties; - + Ports::PortProperties_var _fake_prop_ref; Ports::PaCO_Param_Double_Port * _provides_port; }; #endif diff --git a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx index 10139688a..0c7d319a6 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx @@ -206,6 +206,13 @@ int main(int argc, char* argv[]) { INFOS("Caught CORBA::Exception."); } + catch(omniORB::fatalException& fe) + { + INFOS("Caught omniORB::fatalException:"); + INFOS(" file: " << fe.file()); + INFOS(" line: " << fe.line()); + INFOS(" mesg: " << fe.errmsg()); + } catch(std::exception& exc) { INFOS("Caught std::exception - "<