diff options
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/framing/Correlator.cpp | 11 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/Makefile.am | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/framing/Correlator.cpp b/qpid/cpp/src/qpid/framing/Correlator.cpp index 1c18f6b414..feeb3aa935 100644 --- a/qpid/cpp/src/qpid/framing/Correlator.cpp +++ b/qpid/cpp/src/qpid/framing/Correlator.cpp @@ -27,16 +27,17 @@ void Correlator::request(RequestId id, Action action) { bool Correlator::response(shared_ptr<AMQResponseBody> r) { Actions::iterator begin = actions.lower_bound(r->getRequestId()); - Actions::iterator end = - actions.upper_bound(r->getRequestId()+r->getBatchOffset()); + RequestId last = r->getRequestId()+r->getBatchOffset(); + Actions::iterator i = begin; bool didAction = false; - for(Actions::iterator i=begin; i != end; ++i) { - // FIXME aconway 2007-04-04: Exception handling. + for( ; i != actions.end() && i->first <= last; ++i) { didAction = true; + // FIXME aconway 2007-04-04: handle exceptions thrown by action. i->second(r); - actions.erase(i); } + actions.erase(begin, i); return didAction; } + }} // namespace qpid::framing diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am index e1a91fa8c7..6ca81f960f 100644 --- a/qpid/cpp/src/tests/Makefile.am +++ b/qpid/cpp/src/tests/Makefile.am @@ -24,7 +24,7 @@ broker_unit_tests = \ MessageHandlerTest #client_unit_tests = \ -# ClientChannelTest + ClientChannelTest framing_unit_tests = \ FieldTableTest \ |
