summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Event.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-01-27 01:44:02 +0000
committerAlan Conway <aconway@apache.org>2009-01-27 01:44:02 +0000
commit57acf95c94d52b15b2ad6e6038bf3390d9063282 (patch)
treee7b07be0e204b1e9f4bda85be345efd9dcabca44 /cpp/src/qpid/cluster/Event.cpp
parentd40d874132bc5011a76bd883fdf9d2507a2f8149 (diff)
downloadqpid-python-57acf95c94d52b15b2ad6e6038bf3390d9063282.tar.gz
cluster: Add sequence number to events & frames
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@737968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Event.cpp')
-rw-r--r--cpp/src/qpid/cluster/Event.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/Event.cpp b/cpp/src/qpid/cluster/Event.cpp
index 59a7241715..339c1de1dd 100644
--- a/cpp/src/qpid/cluster/Event.cpp
+++ b/cpp/src/qpid/cluster/Event.cpp
@@ -42,7 +42,7 @@ const size_t EventHeader::HEADER_SIZE =
;
EventHeader::EventHeader(EventType t, const ConnectionId& c, size_t s)
- : type(t), connectionId(c), size(s) {}
+ : type(t), connectionId(c), size(s), sequence(0) {}
Event::Event() {}
@@ -53,10 +53,10 @@ Event::Event(EventType t, const ConnectionId& c, size_t s)
void EventHeader::decode(const MemberId& m, framing::Buffer& buf) {
if (buf.available() <= HEADER_SIZE)
- throw ClusterLeaveException("Not enough for multicast header");
+ throw Exception("Not enough for multicast header");
type = (EventType)buf.getOctet();
if(type != DATA && type != CONTROL)
- throw ClusterLeaveException("Invalid multicast event type");
+ throw Exception("Invalid multicast event type");
connectionId = ConnectionId(m, reinterpret_cast<Connection*>(buf.getLongLong()));
size = buf.getLong();
#ifdef QPID_LATENCY_METRIC
@@ -68,7 +68,7 @@ Event Event::decodeCopy(const MemberId& m, framing::Buffer& buf) {
Event e;
e.decode(m, buf); // Header
if (buf.available() < e.size)
- throw ClusterLeaveException("Not enough data for multicast event");
+ throw Exception("Not enough data for multicast event");
e.store = RefCountedBuffer::create(e.size + HEADER_SIZE);
memcpy(e.getData(), buf.getPointer() + buf.getPosition(), e.size);
return e;