diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-10-19 13:41:38 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-10-19 13:41:38 +0000 |
commit | bf5017c7ca41b3eadf67011f79ef7332998a559b (patch) | |
tree | fc9ba9858183beecc91b2290cd8075968a2f02dc /cpp | |
parent | Fixes (diff) | |
download | ice-bf5017c7ca41b3eadf67011f79ef7332998a559b.tar.bz2 ice-bf5017c7ca41b3eadf67011f79ef7332998a559b.tar.xz ice-bf5017c7ca41b3eadf67011f79ef7332998a559b.zip |
Fixes
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeSessionManager.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceGrid/NodeSessionManager.h | 4 | ||||
-rw-r--r-- | cpp/src/IceGrid/ReplicaSessionManager.cpp | 6 | ||||
-rw-r--r-- | cpp/src/IceGrid/ReplicaSessionManager.h | 4 | ||||
-rw-r--r-- | cpp/src/IceGrid/SessionManager.h | 6 |
5 files changed, 16 insertions, 12 deletions
diff --git a/cpp/src/IceGrid/NodeSessionManager.cpp b/cpp/src/IceGrid/NodeSessionManager.cpp index 363f5bec8b0..d27cbc4c315 100644 --- a/cpp/src/IceGrid/NodeSessionManager.cpp +++ b/cpp/src/IceGrid/NodeSessionManager.cpp @@ -35,7 +35,7 @@ NodeSessionKeepAliveThread::NodeSessionKeepAliveThread(const InternalRegistryPrx } NodeSessionPrx -NodeSessionKeepAliveThread::createSession(const InternalRegistryPrx& registry, IceUtil::Time& timeout) +NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil::Time& timeout) { NodeSessionPrx session; auto_ptr<Ice::Exception> exception; @@ -59,7 +59,7 @@ NodeSessionKeepAliveThread::createSession(const InternalRegistryPrx& registry, I { exception.reset(ex.ice_clone()); used.insert(registry); - setRegistry(InternalRegistryPrx::uncheckedCast(registry->ice_endpoints(Ice::EndpointSeq()))); + registry = InternalRegistryPrx::uncheckedCast(registry->ice_endpoints(Ice::EndpointSeq())); } } @@ -75,7 +75,7 @@ NodeSessionKeepAliveThread::createSession(const InternalRegistryPrx& registry, I if(newRegistry && used.find(newRegistry) == used.end()) { session = createSessionImpl(newRegistry, timeout); - setRegistry(newRegistry); + registry = newRegistry; break; } } @@ -323,7 +323,7 @@ NodeSessionManager::replicaRemoved(const InternalRegistryPrx& replica) return; } - --_serial; + ++_serial; NodeSessionMap::iterator p = _sessions.find(replica->ice_getIdentity()); if(p != _sessions.end()) { diff --git a/cpp/src/IceGrid/NodeSessionManager.h b/cpp/src/IceGrid/NodeSessionManager.h index 84fa666e638..abe8f21a7fd 100644 --- a/cpp/src/IceGrid/NodeSessionManager.h +++ b/cpp/src/IceGrid/NodeSessionManager.h @@ -30,7 +30,7 @@ public: NodeSessionKeepAliveThread(const InternalRegistryPrx&, const NodeIPtr&, const std::vector<QueryPrx>&); - virtual NodeSessionPrx createSession(const InternalRegistryPrx&, IceUtil::Time&); + virtual NodeSessionPrx createSession(InternalRegistryPrx&, IceUtil::Time&); virtual void destroySession(const NodeSessionPrx&); virtual bool keepAlive(const NodeSessionPrx&); @@ -75,7 +75,7 @@ private: } virtual NodeSessionPrx - createSession(const InternalRegistryPrx& master, IceUtil::Time& timeout) + createSession(InternalRegistryPrx& master, IceUtil::Time& timeout) { NodeSessionPrx session = NodeSessionKeepAliveThread::createSession(master, timeout); _manager.createdSession(session); diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp index 82adfb54172..6c6d3f91d92 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.cpp +++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp @@ -398,7 +398,7 @@ ReplicaSessionManager::keepAlive(const ReplicaSessionPrx& session) } ReplicaSessionPrx -ReplicaSessionManager::createSession(const InternalRegistryPrx& registry, IceUtil::Time& timeout) +ReplicaSessionManager::createSession(InternalRegistryPrx& registry, IceUtil::Time& timeout) { ReplicaSessionPrx session; auto_ptr<Ice::Exception> exception; @@ -421,7 +421,7 @@ ReplicaSessionManager::createSession(const InternalRegistryPrx& registry, IceUti { exception.reset(ex.ice_clone()); used.insert(registry); - _thread->setRegistry(InternalRegistryPrx::uncheckedCast(registry->ice_endpoints(Ice::EndpointSeq()))); + registry = InternalRegistryPrx::uncheckedCast(registry->ice_endpoints(Ice::EndpointSeq())); } } @@ -437,7 +437,7 @@ ReplicaSessionManager::createSession(const InternalRegistryPrx& registry, IceUti if(newRegistry && used.find(newRegistry) == used.end()) { session = createSessionImpl(newRegistry, timeout); - _thread->setRegistry(newRegistry); + registry = newRegistry; break; } } diff --git a/cpp/src/IceGrid/ReplicaSessionManager.h b/cpp/src/IceGrid/ReplicaSessionManager.h index ec7f6ca500c..7131146ad34 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.h +++ b/cpp/src/IceGrid/ReplicaSessionManager.h @@ -44,7 +44,7 @@ public: } virtual ReplicaSessionPrx - createSession(const InternalRegistryPrx& master, IceUtil::Time& timeout) + createSession(InternalRegistryPrx& master, IceUtil::Time& timeout) { return _manager.createSession(master, timeout); } @@ -84,7 +84,7 @@ private: friend class Thread; - ReplicaSessionPrx createSession(const InternalRegistryPrx&, IceUtil::Time&); + ReplicaSessionPrx createSession(InternalRegistryPrx&, IceUtil::Time&); ReplicaSessionPrx createSessionImpl(const InternalRegistryPrx&, IceUtil::Time&); void destroySession(const ReplicaSessionPrx&); bool keepAlive(const ReplicaSessionPrx&); diff --git a/cpp/src/IceGrid/SessionManager.h b/cpp/src/IceGrid/SessionManager.h index 04264cc0a9d..4ac9e488cbc 100644 --- a/cpp/src/IceGrid/SessionManager.h +++ b/cpp/src/IceGrid/SessionManager.h @@ -72,6 +72,10 @@ public: assert(_state == InProgress); _state = session ? Connected : Disconnected; _session = session; + if(_session) + { + _registry = registry; + } if(_nextAction == Connect && _state == Connected) { _nextAction = KeepAlive; @@ -242,7 +246,7 @@ public: return _registry; } - virtual TPrx createSession(const InternalRegistryPrx&, IceUtil::Time&) = 0; + virtual TPrx createSession(InternalRegistryPrx&, IceUtil::Time&) = 0; virtual void destroySession(const TPrx&) = 0; virtual bool keepAlive(const TPrx&) = 0; |