diff options
author | Gordon Sim <gsim@apache.org> | 2007-09-13 17:29:16 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-09-13 17:29:16 +0000 |
commit | 0a1b3430450f274aee273a9f792a2d43f771b85f (patch) | |
tree | 71be3bc1a920a568c0680f8e8a5e802c1c3bee8d /cpp/src/qpid/broker/Session.cpp | |
parent | e00a1cfa3881e3bb8aadfecdf502f17903e319b1 (diff) | |
download | qpid-python-0a1b3430450f274aee273a9f792a2d43f771b85f.tar.gz |
Use frameset begin/end flags for determining frameset boundaries.
Set frameset & segment begin/end flags for content bearing methods (i.e. messages).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@575377 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Session.cpp')
-rw-r--r-- | cpp/src/qpid/broker/Session.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cpp/src/qpid/broker/Session.cpp b/cpp/src/qpid/broker/Session.cpp index c98fdd6291..d3f82655d0 100644 --- a/cpp/src/qpid/broker/Session.cpp +++ b/cpp/src/qpid/broker/Session.cpp @@ -268,8 +268,8 @@ bool Session::ConsumerImpl::deliver(QueuedMessage& msg) DeliveryId deliveryTag = parent->deliveryAdapter->deliver(msg.payload, token); - if (ackExpected) { - parent->record(DeliveryRecord(msg, queue, name, deliveryTag, acquire)); + if (windowing || ackExpected) { + parent->record(DeliveryRecord(msg, queue, name, deliveryTag, acquire, !ackExpected)); } } return !blocked; @@ -565,12 +565,14 @@ AckRange Session::findRange(DeliveryId first, DeliveryId last) ack_iterator start = find_if(unacked.begin(), unacked.end(), bind2nd(mem_fun_ref(&DeliveryRecord::matchOrAfter), first)); ack_iterator end = start; - if (first == last) { - //just acked single element (move end past it) - ++end; - } else { - //need to find end (position it just after the last record in range) - end = find_if(start, unacked.end(), bind2nd(mem_fun_ref(&DeliveryRecord::after), last)); + if (start != unacked.end()) { + if (first == last) { + //just acked single element (move end past it) + ++end; + } else { + //need to find end (position it just after the last record in range) + end = find_if(start, unacked.end(), bind2nd(mem_fun_ref(&DeliveryRecord::after), last)); + } } return AckRange(start, end); } |