From 57acf95c94d52b15b2ad6e6038bf3390d9063282 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 27 Jan 2009 01:44:02 +0000 Subject: 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 --- cpp/src/qpid/cluster/Event.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/cluster/Event.cpp') 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(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; -- cgit v1.2.1