diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-09-13 13:30:25 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-09-13 13:30:25 +0000 |
commit | b6e34d38e9efaa822c8a8dfd4bc8a3d99a052e74 (patch) | |
tree | cec6fbe2201bcfcb9376a61a00143ad88e06516e /cpp/src/IceGrid/Topics.cpp | |
parent | Win32 fixes (diff) | |
download | ice-b6e34d38e9efaa822c8a8dfd4bc8a3d99a052e74.tar.bz2 ice-b6e34d38e9efaa822c8a8dfd4bc8a3d99a052e74.tar.xz ice-b6e34d38e9efaa822c8a8dfd4bc8a3d99a052e74.zip |
Fixes
Diffstat (limited to 'cpp/src/IceGrid/Topics.cpp')
-rw-r--r-- | cpp/src/IceGrid/Topics.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/cpp/src/IceGrid/Topics.cpp b/cpp/src/IceGrid/Topics.cpp index 78bb60155c0..4f7a2b5e73e 100644 --- a/cpp/src/IceGrid/Topics.cpp +++ b/cpp/src/IceGrid/Topics.cpp @@ -52,20 +52,20 @@ public: _topic(topic), _observer(observer), _serial(serial) - { - } + { + } void ice_response() - { - _topic->subscribe(_observer, _serial); - } + { + _topic->subscribe(_observer, _serial); + } void ice_exception(const Ice::Exception&) - { - // Ignore - } + { + // Ignore + } private: @@ -90,9 +90,7 @@ void NodeObserverTopic::nodeUp(const NodeDynamicInfo& info, const Ice::Current& current) { Lock sync(*this); - _nodes.insert(make_pair(info.name, info)); - _publisher->nodeUp(info); } @@ -100,11 +98,11 @@ void NodeObserverTopic::nodeDown(const string& name, const Ice::Current&) { Lock sync(*this); - - assert(_nodes.find(name) != _nodes.end()); - _nodes.erase(name); - - _publisher->nodeDown(name); + if(_nodes.find(name) != _nodes.end()) + { + _nodes.erase(name); + _publisher->nodeDown(name); + } } |