summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/JoiningHandler.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-27 00:08:18 +0000
committerAlan Conway <aconway@apache.org>2008-09-27 00:08:18 +0000
commit5d140890605743357347a0c0326ed4cf78117d8d (patch)
tree1eda6d5b7e99e52313d10248b89df7096e6bc498 /cpp/src/qpid/cluster/JoiningHandler.cpp
parent47b7d230566810cd84446859b63885329186e943 (diff)
downloadqpid-python-5d140890605743357347a0c0326ed4cf78117d8d.tar.gz
Added missing locks in cluster code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@699535 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/JoiningHandler.cpp')
-rw-r--r--cpp/src/qpid/cluster/JoiningHandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/JoiningHandler.cpp b/cpp/src/qpid/cluster/JoiningHandler.cpp
index 6838313263..dbee0ece61 100644
--- a/cpp/src/qpid/cluster/JoiningHandler.cpp
+++ b/cpp/src/qpid/cluster/JoiningHandler.cpp
@@ -47,6 +47,7 @@ void JoiningHandler::configChange(
}
void JoiningHandler::deliver(Event& e) {
+ Mutex::ScopedLock l(cluster.lock);
// Discard connection events unless we are stalled to receive a dump.
if (state == STALLED)
cluster.connectionEventQueue.push(e);
@@ -60,7 +61,7 @@ void JoiningHandler::update(const MemberId&, const framing::FieldTable& members,
checkDumpRequest();
}
-void JoiningHandler::checkDumpRequest() {
+void JoiningHandler::checkDumpRequest() { // Call with lock held
if (state == START && !cluster.map.dumper) {
cluster.broker.getPort(); // ensure the broker is listening.
state = DUMP_REQUESTED;