summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Event.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-26 17:11:19 +0000
committerAlan Conway <aconway@apache.org>2008-09-26 17:11:19 +0000
commitb22dd47558cc11572d080ac25808012092dda597 (patch)
tree32c1948cfa796d74bbb8e5d137c1413900311b22 /cpp/src/qpid/cluster/Event.cpp
parent13214589d918524d7058b673098fea03179290bd (diff)
downloadqpid-python-b22dd47558cc11572d080ac25808012092dda597.tar.gz
Fix build problems on rhel 5.2 and 64-bit encoding bug.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@699413 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Event.cpp')
-rw-r--r--cpp/src/qpid/cluster/Event.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/Event.cpp b/cpp/src/qpid/cluster/Event.cpp
index 43335e3607..2531001504 100644
--- a/cpp/src/qpid/cluster/Event.cpp
+++ b/cpp/src/qpid/cluster/Event.cpp
@@ -31,16 +31,16 @@ namespace cluster {
using framing::Buffer;
-const size_t Event::OVERHEAD = sizeof(uint8_t) + sizeof(uint64_t) + sizeof(size_t);
+const size_t Event::OVERHEAD = sizeof(uint8_t) + sizeof(uint64_t) + sizeof(uint32_t);
-Event::Event(EventType t, const ConnectionId& c, size_t s, size_t i)
+Event::Event(EventType t, const ConnectionId& c, size_t s, uint32_t i)
: type(t), connectionId(c), size(s), data(RefCountedBuffer::create(s)), id(i) {}
Event Event::delivered(const MemberId& m, void* d, size_t s) {
Buffer buf(static_cast<char*>(d), s);
EventType type((EventType)buf.getOctet());
ConnectionId connection(m, reinterpret_cast<Connection*>(buf.getLongLong()));
- size_t id = buf.getLong();
+ uint32_t id = buf.getLong();
assert(buf.getPosition() == OVERHEAD);
Event e(type, connection, s-OVERHEAD, id);
memcpy(e.getData(), static_cast<char*>(d)+OVERHEAD, s-OVERHEAD);