You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2007/05/11 14:03:25 UTC

svn commit: r537171 - /incubator/qpid/branches/M2/cpp/lib/client/ClientChannel.cpp

Author: gsim
Date: Fri May 11 05:03:24 2007
New Revision: 537171

URL: http://svn.apache.org/viewvc?view=rev&rev=537171
Log:
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)


Modified:
    incubator/qpid/branches/M2/cpp/lib/client/ClientChannel.cpp

Modified: incubator/qpid/branches/M2/cpp/lib/client/ClientChannel.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/cpp/lib/client/ClientChannel.cpp?view=diff&rev=537171&r1=537170&r2=537171
==============================================================================
--- incubator/qpid/branches/M2/cpp/lib/client/ClientChannel.cpp (original)
+++ incubator/qpid/branches/M2/cpp/lib/client/ClientChannel.cpp Fri May 11 05:03:24 2007
@@ -171,7 +171,7 @@
     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 @@
             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;
         }
     }