diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Object.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceStorm/Flusher.cpp | 3 | ||||
-rw-r--r-- | cpp/src/IceStorm/TopicManagerI.cpp | 31 |
3 files changed, 32 insertions, 6 deletions
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 8fe66e03a3c..08ce2d3f57b 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -245,11 +245,11 @@ Ice::Object::ice_findFacet(const string& name) } DispatchStatus -Ice::Blobject::__dispatch(Incoming& in, const string& identity, const string& facet, const string& operation) +Ice::Blobject::__dispatch(Incoming& in, const string& id, const string& facet, const string& operation) { vector<Byte> blob; Int sz = in.is()->getReadEncapsSize(); in.is()->readBlob(blob, sz); - ice_invokeIn(identity, facet, operation, blob); + ice_invokeIn(id, facet, operation, blob); return ::IceInternal::DispatchOK; } diff --git a/cpp/src/IceStorm/Flusher.cpp b/cpp/src/IceStorm/Flusher.cpp index 9d6952ab5fe..f4eee53dc8d 100644 --- a/cpp/src/IceStorm/Flusher.cpp +++ b/cpp/src/IceStorm/Flusher.cpp @@ -29,7 +29,8 @@ public: FlusherThread(const Ice::CommunicatorPtr& communicator, const TraceLevelsPtr& traceLevels) : _traceLevels(traceLevels), - _logger(communicator->getLogger()) + _logger(communicator->getLogger()), + _destroy(false) { Ice::PropertiesPtr properties = communicator->getProperties(); string value; diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index 2fe5fd032c0..7a282c28baa 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -44,7 +44,9 @@ TopicManagerI::create(const string& name) if (_topicIMap.find(name) != _topicIMap.end()) { - throw TopicExists(); + TopicExists ex; + ex.name = name; + throw ex; } if (_traceLevels->topicMgr > 0) @@ -73,7 +75,9 @@ TopicManagerI::retrieve(const string& name) if (_topicIMap.find(name) != _topicIMap.end()) return TopicPrx::uncheckedCast(_adapter->createProxy(name)); - throw NoSuchTopic(); + NoSuchTopic ex; + ex.name = name; + throw ex; } // @@ -132,7 +136,28 @@ TopicManagerI::subscribe(const string& id, const QoS& qos, const StringSeq& topi _communicator->getLogger()->trace(_traceLevels->topicMgrCat, s.str()); } - for (StringSeq::const_iterator i = topics.begin() ; i != topics.end() ; ++i) + // + // First scan the set of topics to ensure that each exists. + // + // TODO: This could be slightly optimized by remembering the + // TopicIPtr's so that the list doesn't need to scanned again. + // + StringSeq::const_iterator i; + for (i = topics.begin() ; i != topics.end() ; ++i) + { + TopicIMap::iterator elem = _topicIMap.find(*i); + if (elem == _topicIMap.end()) + { + NoSuchTopic ex; + ex.name = *i; + throw ex; + } + } + + // + // Now subscribe to each Topic. + // + for (i = topics.begin() ; i != topics.end() ; ++i) { TopicIMap::iterator elem = _topicIMap.find(*i); if (elem != _topicIMap.end()) |