From 0c82d52e3b737d88b3fd30391ce9f1968735c4d2 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 11 May 2007 12:03:24 +0000 Subject: Fix for acknowledgements (since the addition of the protocol version, the 'wrong' constructor to BasicAckBody was being called resulting in random values for delivery tag and multiple) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@537171 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/client/ClientChannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/lib/client/ClientChannel.cpp') diff --git a/cpp/lib/client/ClientChannel.cpp b/cpp/lib/client/ClientChannel.cpp index d3c91d786e..4ec0d87eeb 100644 --- a/cpp/lib/client/ClientChannel.cpp +++ b/cpp/lib/client/ClientChannel.cpp @@ -171,7 +171,7 @@ void Channel::cancelAll(){ for(consumer_iterator i = consumers.begin(); i != consumers.end(); i = consumers.begin()){ Consumer* c = i->second; if((c->ackMode == LAZY_ACK || c->ackMode == AUTO_ACK) && c->lastDeliveryTag > 0){ - out->send(new AMQFrame(version, id, new BasicAckBody(c->lastDeliveryTag, true))); + out->send(new AMQFrame(version, id, new BasicAckBody(version, c->lastDeliveryTag, true))); } consumers.erase(i); delete c; @@ -377,7 +377,7 @@ void Channel::deliver(Consumer* consumer, Message& msg){ if(++(consumer->count) < prefetch) break; //else drop-through case AUTO_ACK: - out->send(new AMQFrame(version, id, new BasicAckBody(msg.getDeliveryTag(), multiple))); + out->send(new AMQFrame(version, id, new BasicAckBody(version, msg.getDeliveryTag(), multiple))); consumer->lastDeliveryTag = 0; } } -- cgit v1.2.1