summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/AccumulatedAck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/broker/AccumulatedAck.cpp')
-rw-r--r--cpp/lib/broker/AccumulatedAck.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/lib/broker/AccumulatedAck.cpp b/cpp/lib/broker/AccumulatedAck.cpp
index 2f2a7464c1..5f66adb2b9 100644
--- a/cpp/lib/broker/AccumulatedAck.cpp
+++ b/cpp/lib/broker/AccumulatedAck.cpp
@@ -18,14 +18,17 @@
* under the License.
*
*/
-#include <AccumulatedAck.h>
+#include "AccumulatedAck.h"
+
+#include <assert.h>
using std::less_equal;
using std::bind2nd;
using namespace qpid::broker;
void AccumulatedAck::update(u_int64_t firstTag, u_int64_t lastTag){
- if (firstTag-1 == range) {
+ assert(firstTag<=lastTag);
+ if (firstTag <= range+1) {
range = lastTag;
} else {
for (u_int64_t tag = firstTag; tag<=lastTag; tag++)