From 0887a7ce8b853d66350ad01dfc0e0e2fc49d752d Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 17 Aug 2015 15:56:10 +0200 Subject: [PATCH] Warining hunting that solves a big bug in Release mode... --- idl/SALOME_SDS.idl | 4 ++-- src/SALOMESDS/SALOMESDS_DataScopeServer.cxx | 10 +++++----- src/SALOMESDS/SALOMESDS_DataServerManager.cxx | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/idl/SALOME_SDS.idl b/idl/SALOME_SDS.idl index cabea85c9..a01e1576c 100644 --- a/idl/SALOME_SDS.idl +++ b/idl/SALOME_SDS.idl @@ -138,10 +138,10 @@ module SALOME boolean isAliveAndKicking(in string scopeName) raises (SALOME::SALOME_Exception); // DataScopeServer createDataScope(in string scopeName) raises (SALOME::SALOME_Exception); - DataScopeServer giveADataScopeCalled(in string scopeName, out boolean isCreated); + DataScopeServer giveADataScopeCalled(in string scopeName, out boolean isCreated) raises (SALOME::SALOME_Exception); // DataScopeServerTransaction createDataScopeTransaction(in string scopeName) raises (SALOME::SALOME_Exception); - DataScopeServerTransaction giveADataScopeTransactionCalled(in string scopeName, out boolean isCreated); + DataScopeServerTransaction giveADataScopeTransactionCalled(in string scopeName, out boolean isCreated) raises (SALOME::SALOME_Exception); // DataScopeServerBase retriveDataScope(in string scopeName) raises (SALOME::SALOME_Exception); void removeDataScope(in string scopeName) raises (SALOME::SALOME_Exception); diff --git a/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx b/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx index e471c502f..0775efc7d 100644 --- a/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx +++ b/src/SALOMESDS/SALOMESDS_DataScopeServer.cxx @@ -56,7 +56,7 @@ DataScopeServerBase::DataScopeServerBase(CORBA::ORB_ptr orb, SALOME::DataScopeKi { } -DataScopeServerBase::DataScopeServerBase(const DataScopeServerBase& other):_globals(0),_locals(0),_pickler(0),_name(other._name),_vars(other._vars),_killer(other._killer) +DataScopeServerBase::DataScopeServerBase(const DataScopeServerBase& other):omniServant(other),ServantBase(other),_globals(0),_locals(0),_pickler(0),_name(other._name),_vars(other._vars),_killer(other._killer) { } @@ -434,7 +434,7 @@ DataScopeServer::DataScopeServer(CORBA::ORB_ptr orb, SALOME::DataScopeKiller_var { } -DataScopeServer::DataScopeServer(const DataScopeServer& other):DataScopeServerBase(other) +DataScopeServer::DataScopeServer(const DataScopeServer& other):omniServant(other),ServantBase(other),DataScopeServerBase(other) { } @@ -493,7 +493,7 @@ DataScopeServerTransaction::DataScopeServerTransaction(CORBA::ORB_ptr orb, SALOM _poa_for_key_waiter=poa2; } -DataScopeServerTransaction::DataScopeServerTransaction(const DataScopeServerTransaction& other):DataScopeServerBase(other),_poa_for_key_waiter(other.getPOA4KeyWaiter()) +DataScopeServerTransaction::DataScopeServerTransaction(const DataScopeServerTransaction& other):omniServant(other),ServantBase(other),DataScopeServerBase(other),_poa_for_key_waiter(other.getPOA4KeyWaiter()) { } @@ -672,7 +672,7 @@ SALOME::Transaction_ptr DataScopeServerTransaction::addKeyValueInVarErrorIfAlrea TransactionAddKeyValueErrorIfAlreadyExisting *ret(new TransactionAddKeyValueErrorIfAlreadyExisting(this,varName,key,value)); CORBA::Object_var obj(ret->activate()); return SALOME::Transaction::_narrow(obj); -}; +} SALOME::TransactionMultiKeyAddSession_ptr DataScopeServerTransaction::addMultiKeyValueSession(const char *varName) { @@ -737,7 +737,7 @@ SALOME::ByteVec *DataScopeServerTransaction::waitForMonoThrRev(SALOME::KeyWaiter if(!retc) throw Exception("DataScopeServerTransaction::invokeMonoThr : internal error 1 !"); retc->_remove_ref(); - retc->waitForMonoThr(); + return retc->waitForMonoThr(); } void DataScopeServerTransaction::atomicApply(const SALOME::ListOfTransaction& transactions) diff --git a/src/SALOMESDS/SALOMESDS_DataServerManager.cxx b/src/SALOMESDS/SALOMESDS_DataServerManager.cxx index f8b2678e0..aa281bf78 100644 --- a/src/SALOMESDS/SALOMESDS_DataServerManager.cxx +++ b/src/SALOMESDS/SALOMESDS_DataServerManager.cxx @@ -122,6 +122,11 @@ typename T::PtrType CreateDataScope(const std::string& scopeName, const std::vec std::string command(oss.str()); SALOME_ContainerManager::MakeTheCommandToBeLaunchedASync(command); int status(SALOME_ContainerManager::SystemThreadSafe(command.c_str())); + if(status!=0) + { + std::ostringstream oss2; oss2 << "CreateDataScope : Fail to launch \"" << command << "\" ! Return code was : " << status << " !"; + throw Exception(oss2.str()); + } int count(SALOME_ContainerManager::GetTimeOutToLoaunchServer()); typename T::VarType ret(T::nil()); while (CORBA::is_nil(ret) && count) @@ -286,7 +291,6 @@ std::vector DataServerManager::listOfScopesCpp() SALOME::DataScopeServerBase_var DataServerManager::GetScopePtrGivenName(const std::string& scopeName, const std::vector& scopes, SALOME_NamingService& ns) { - std::size_t sz(scopes.size()); if(std::find(scopes.begin(),scopes.end(),scopeName)==scopes.end()) { std::ostringstream oss; oss << "DataServerManager::getScopePtrGivenName : scope name \"" << scopeName << "\" does not exist !"; -- 2.39.2