From bc84e62cc549ac2d751a45d61a867354c84c60d6 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 16 Jan 2007 20:17:50 +0000 Subject: * Renamed Session* classes to Connection* to align with AMQP spec - broker::SessionHandlerImpl -> broker::Connection - broker::SessionHandlerImplFactory -> broker::ConnectionFactory - sys::SessionHandler -> ConnectionInputHandler - sys::SessionHandlerFactory -> ConnectionInputHandlerFactory git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@496848 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/common/framing/Requester.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cpp/lib/common/framing/Requester.cpp') diff --git a/cpp/lib/common/framing/Requester.cpp b/cpp/lib/common/framing/Requester.cpp index 1dd3cd4ce9..7e1da505c6 100644 --- a/cpp/lib/common/framing/Requester.cpp +++ b/cpp/lib/common/framing/Requester.cpp @@ -33,13 +33,15 @@ void Requester::sending(AMQRequestBody::Data& request) { void Requester::processed(const AMQResponseBody::Data& response) { responseMark = response.responseId; RequestId id = response.requestId; - RequestId end = id + response.batchOffset; + RequestId end = id + response.batchOffset + 1; for ( ; id < end; ++id) { std::set::iterator i = requests.find(id); - if (i == requests.end()) - // TODO aconway 2007-01-12: Verify this is the right exception. - THROW_QPID_ERROR(PROTOCOL_ERROR, "Invalid response."); - requests.erase(i); + if (i != requests.end()) + requests.erase(i); + else { + // FIXME aconway 2007-01-16: Uncomment exception when ids are propagating. +// THROW_QPID_ERROR(PROTOCOL_ERROR, "Invalid response."); + } } } -- cgit v1.2.1