summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cluster.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-07-27 22:08:51 +0000
committerAlan Conway <aconway@apache.org>2007-07-27 22:08:51 +0000
commit956a72f00b64928a601ea2891789a53271fc7571 (patch)
treec4469485822787d4742b06d35e23df007f399ed9 /cpp/src/qpid/cluster/Cluster.cpp
parentac669123004b6e78468cc4fcea3ffb4b9d7b7bd3 (diff)
downloadqpid-python-956a72f00b64928a601ea2891789a53271fc7571.tar.gz
* src/tests/ais_check, cluster.mk: Run AIS tests only if:
- CLUSTER makefile conditional set by configure. - Effective gid == ais - aisexec is running Otherwise print a warning. * src/tests/EventChannelConnectionTest.cpp * src/qpid/cluster/doxygen_overview.h Removed unused files. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@560404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.cpp')
-rw-r--r--cpp/src/qpid/cluster/Cluster.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp
index b59bfe878d..52d8691f33 100644
--- a/cpp/src/qpid/cluster/Cluster.cpp
+++ b/cpp/src/qpid/cluster/Cluster.cpp
@@ -19,7 +19,6 @@
#include "Cluster.h"
#include "qpid/framing/AMQFrame.h"
#include "qpid/framing/ClusterNotifyBody.h"
-#include "qpid/framing/Uuid.h"
#include "qpid/log/Statement.h"
#include <boost/bind.hpp>
#include <algorithm>
@@ -52,9 +51,9 @@ ostream& operator <<(ostream& out, const Cluster::MemberMap& members) {
Cluster::Cluster(
const std::string& name_, const std::string& url_,
- const SessionFrameHandler::Chain& next
+ const FrameHandler::Chain& next
) :
- SessionFrameHandler(next),
+ FrameHandler(next),
cpg(new Cpg(*this)),
name(name_),
url(url_),
@@ -85,7 +84,7 @@ Cluster::~Cluster() {
}
}
-void Cluster::handle(SessionFrame& frame) {
+void Cluster::handle(AMQFrame& frame) {
QPID_LOG(trace, *this << " SEND: " << frame);
Buffer buf(frame.size());
frame.encode(buf);
@@ -95,9 +94,9 @@ void Cluster::handle(SessionFrame& frame) {
}
void Cluster::notify() {
- SessionFrame sf;
- sf.frame.setBody(make_shared_ptr(new ClusterNotifyBody(ProtocolVersion(), url)));
- handle(sf);
+ AMQFrame frame(ProtocolVersion(), 0,
+ new ClusterNotifyBody(ProtocolVersion(), url));
+ handle(frame);
}
size_t Cluster::size() const {
@@ -125,11 +124,11 @@ void Cluster::deliver(
assert(name == *group);
Id from(nodeid, pid);
Buffer buf(static_cast<char*>(msg), msg_len);
- SessionFrame frame;
+ AMQFrame frame;
frame.decode(buf);
QPID_LOG(trace, *this << " RECV: " << frame << " from: " << from);
- if (frame.uuid.isNull())
- handleClusterFrame(from, frame.frame);
+ if (frame.getChannel() == 0)
+ handleClusterFrame(from, frame);
else
next->handle(frame);
}