You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/11/12 17:58:37 UTC

svn commit: r1541145 - /qpid/trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp

Author: aconway
Date: Tue Nov 12 16:58:36 2013
New Revision: 1541145

URL: http://svn.apache.org/r1541145
Log:
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.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp?rev=1541145&r1=1541144&r2=1541145&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp Tue Nov 12 16:58:36 2013
@@ -146,6 +146,7 @@ Exchange::shared_ptr ExchangeRegistry::g
 }
 
 bool ExchangeRegistry::registerExchange(const Exchange::shared_ptr& ex) {
+    RWlock::ScopedWlock locker(lock);
     return exchanges.insert(ExchangeMap::value_type(ex->getName(), ex)).second;
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org