You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/02/20 16:42:01 UTC
svn commit: r1570234 -
/qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java
Author: rgodfrey
Date: Thu Feb 20 15:42:00 2014
New Revision: 1570234
URL: http://svn.apache.org/r1570234
Log:
QPID-5570 : Client incorrectly acknowledges prefetched messages with client-ack
Modified:
qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java
Modified: qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java?rev=1570234&r1=1570233&r2=1570234&view=diff
==============================================================================
--- qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java (original)
+++ qpid/trunk/qpid/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ReceivingLinkEndpoint.java Thu Feb 20 15:42:00 2014
@@ -370,29 +370,31 @@ public class ReceivingLinkEndpoint exten
UnsignedInteger first = deliveryId;
UnsignedInteger last = first;
- while(iter.hasNext())
+ if(!firstTag.equals(lastTag))
{
- tag = iter.next();
- tagsToUpdate.add(tag);
-
- deliveryId = _unsettledIds.get(tag).getDeliveryId();
-
- if(deliveryId.equals(last.add(UnsignedInteger.ONE)))
- {
- last = deliveryId;
- }
- else
+ while(iter.hasNext())
{
- ranges.put(first,last);
- first = last = deliveryId;
- }
+ tag = iter.next();
+ tagsToUpdate.add(tag);
- if(tag.equals(lastTag))
- {
- break;
+ deliveryId = _unsettledIds.get(tag).getDeliveryId();
+
+ if(deliveryId.equals(last.add(UnsignedInteger.ONE)))
+ {
+ last = deliveryId;
+ }
+ else
+ {
+ ranges.put(first,last);
+ first = last = deliveryId;
+ }
+
+ if(tag.equals(lastTag))
+ {
+ break;
+ }
}
}
-
ranges.put(first,last);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org