diff options
| author | Alan Conway <aconway@apache.org> | 2013-11-12 16:58:36 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2013-11-12 16:58:36 +0000 |
| commit | 8f88e1e89b43c6d86851fe2fa183ff4ea58d352b (patch) | |
| tree | a17c625934f1309f823b9a9d9a14713f47a49a61 /cpp/src | |
| parent | c5f0fe7d141b1679323452d3ee9a96b502accbc0 (diff) | |
| download | qpid-python-8f88e1e89b43c6d86851fe2fa183ff4ea58d352b.tar.gz | |
QPID-5275: Add missing lock to ExchangeRegistry::registerExchange
Discovered while working on QPID-5275: ExchangeRegistry::registerExchange was
not taking the write lock. Caused sporadic core dumps in ha_tests.py,
tx_block_threads.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1541145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/broker/ExchangeRegistry.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/ExchangeRegistry.cpp b/cpp/src/qpid/broker/ExchangeRegistry.cpp index 34a31fe769..c43e6afc89 100644 --- a/cpp/src/qpid/broker/ExchangeRegistry.cpp +++ b/cpp/src/qpid/broker/ExchangeRegistry.cpp @@ -146,6 +146,7 @@ Exchange::shared_ptr ExchangeRegistry::get(const string& name) { } bool ExchangeRegistry::registerExchange(const Exchange::shared_ptr& ex) { + RWlock::ScopedWlock locker(lock); return exchanges.insert(ExchangeMap::value_type(ex->getName(), ex)).second; } |
