diff options
| author | Gordon Sim <gsim@apache.org> | 2007-06-27 15:29:17 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-06-27 15:29:17 +0000 |
| commit | d7c68d138a1151db2b0d133c94f8b1843850e867 (patch) | |
| tree | 1171bf86137f08f2ece9e0516407a3735ecc3fca /cpp/src/qpid/broker/ExchangeRegistry.cpp | |
| parent | d3f472ec2033df0cc35f020819477e4f59077046 (diff) | |
| download | qpid-python-d7c68d138a1151db2b0d133c94f8b1843850e867.tar.gz | |
Fixes and tests:
* ExchangeRegistry::get() caused a pair to be inserted with a 'null' pointer if the xchange didn't exist
* HeadersExchange::isBound() didn't check queue param
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551197 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ExchangeRegistry.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/ExchangeRegistry.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/ExchangeRegistry.cpp b/cpp/src/qpid/broker/ExchangeRegistry.cpp index 3bf211b960..9555fa43a4 100644 --- a/cpp/src/qpid/broker/ExchangeRegistry.cpp +++ b/cpp/src/qpid/broker/ExchangeRegistry.cpp @@ -71,10 +71,10 @@ void ExchangeRegistry::destroy(const string& name){ Exchange::shared_ptr ExchangeRegistry::get(const string& name){ Mutex::ScopedLock locker(lock); - Exchange::shared_ptr exchange =exchanges[name]; - if (!exchange) + ExchangeMap::iterator i = exchanges.find(name); + if (i == exchanges.end()) throw ChannelException(404, "Exchange not found:" + name); - return exchange; + return i->second; } namespace |
