From 42c905a3ca29a1e911e7def9c2d9d9b8e95383cd Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Fri, 26 Oct 2018 17:17:11 -0400 Subject: Extra C++ warning flags with clang and g++. Fixes 223. --- cpp/src/IceGrid/ServerCache.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'cpp/src/IceGrid/ServerCache.cpp') diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index 933d204722c..fdceb9c6748 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -80,7 +80,7 @@ CheckUpdateResult::CheckUpdateResult(const string& server, bool noRestart, bool remove, const Ice::AsyncResultPtr& result) : - _server(server), _node(node), _noRestart(noRestart), _result(result) + _server(server), _node(node), _remove(remove), _noRestart(noRestart), _result(result) { } @@ -94,7 +94,14 @@ CheckUpdateResult::getResult() catch(const DeploymentException& ex) { ostringstream os; - os << "check for server `" << _server << "' update failed: " << ex.reason; + if(_remove) + { + os << "check for server `" << _server << "' remove failed: " << ex.reason; + } + else + { + os << "check for server `" << _server << "' update failed: " << ex.reason; + } throw DeploymentException(os.str()); } catch(const Ice::OperationNotExistException&) @@ -449,7 +456,7 @@ ServerEntry::update(const ServerInfo& info, bool noRestart) if(info.descriptor->activation == "session") { _allocatable = true; - _load->sessionId = _session ? _session->getId() : string(""); + _load->sessionId = _allocationSession ? _allocationSession->getId() : string(""); } } @@ -493,7 +500,7 @@ ServerEntry::getInfo(bool resolve) const throw ServerNotExistException(); } info = _loaded.get() ? *_loaded : *_load; - session = _session; + session = _allocationSession; } assert(info.descriptor); if(resolve) @@ -696,7 +703,7 @@ ServerEntry::syncImpl() else if(_load.get()) { load = *_load; - session = _session; + session = _allocationSession; timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server. } else @@ -874,7 +881,7 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i { load = *_load; noRestart = _noRestart; - session = _session; + session = _allocationSession; timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server. } } @@ -937,7 +944,7 @@ ServerEntry::destroyCallback() _updated = false; load = *_load; noRestart = _noRestart; - session = _session; + session = _allocationSession; } } @@ -988,7 +995,7 @@ ServerEntry::exception(const Ice::Exception& ex) _updated = false; load = *_load.get(); noRestart = _noRestart; - session = _session; + session = _allocationSession; timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server. } } @@ -1041,7 +1048,7 @@ ServerEntry::checkUpdate(const ServerInfo& info, bool noRestart) } oldInfo = _loaded.get() ? *_loaded : *_load; - session = _session; + session = _allocationSession; } NodeEntryPtr node; @@ -1131,7 +1138,7 @@ ServerEntry::allocated(const SessionIPtr& session) { _load.reset(_loaded.release()); } - _session = session; + _allocationSession = session; _load->sessionId = session->getId(); } @@ -1218,7 +1225,7 @@ ServerEntry::released(const SessionIPtr& session) _load.reset(_loaded.release()); } _load->sessionId = ""; - _session = 0; + _allocationSession = 0; } TraceLevelsPtr traceLevels = _cache.getTraceLevels(); -- cgit v1.2.3