diff options
author | Alan Conway <aconway@apache.org> | 2007-04-16 20:50:45 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-04-16 20:50:45 +0000 |
commit | 8d10631aebd3de4b8cf88083af12549c0f2af0f5 (patch) | |
tree | 24e187d96c6c7592892c13d8f90f1627a91ff865 /cpp/src | |
parent | f23383dad09fb4c18fc697fd67df2856dba84671 (diff) | |
download | qpid-python-8d10631aebd3de4b8cf88083af12549c0f2af0f5.tar.gz |
* qpidc.spec.in: bump RPM revision for bugfix.
* src/qpid/framing/Correlator.cpp: Fix memory bug in correlator.
* src/tests/Makefile.am: Re-enable ClientChannelTest, bug fixed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@529397 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/framing/Correlator.cpp | 11 | ||||
-rw-r--r-- | cpp/src/tests/Makefile.am | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/cpp/src/qpid/framing/Correlator.cpp b/cpp/src/qpid/framing/Correlator.cpp index 1c18f6b414..feeb3aa935 100644 --- a/cpp/src/qpid/framing/Correlator.cpp +++ b/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/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am index e1a91fa8c7..6ca81f960f 100644 --- a/cpp/src/tests/Makefile.am +++ b/cpp/src/tests/Makefile.am @@ -24,7 +24,7 @@ broker_unit_tests = \ MessageHandlerTest #client_unit_tests = \ -# ClientChannelTest + ClientChannelTest framing_unit_tests = \ FieldTableTest \ |