summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-04-16 20:50:45 +0000
committerAlan Conway <aconway@apache.org>2007-04-16 20:50:45 +0000
commit8d10631aebd3de4b8cf88083af12549c0f2af0f5 (patch)
tree24e187d96c6c7592892c13d8f90f1627a91ff865 /cpp
parentf23383dad09fb4c18fc697fd67df2856dba84671 (diff)
downloadqpid-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')
-rw-r--r--cpp/qpidc.spec.in5
-rw-r--r--cpp/src/qpid/framing/Correlator.cpp11
-rw-r--r--cpp/src/tests/Makefile.am2
3 files changed, 11 insertions, 7 deletions
diff --git a/cpp/qpidc.spec.in b/cpp/qpidc.spec.in
index d0dba86011..39888cc5dd 100644
--- a/cpp/qpidc.spec.in
+++ b/cpp/qpidc.spec.in
@@ -5,7 +5,7 @@
Name: @PACKAGE@
Version: @VERSION@
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Libraries for Qpid C++ client applications
Group: System Environment/Libraries
License: Apache Software License
@@ -145,6 +145,9 @@ fi
%changelog
+* Mon Apr 16 2007 Alan Conway <aconway@redhat.com> - 0.2-2
+- Bugfix for memory errors on x86_64.
+
* Thu Apr 12 2007 Alan Conway <aconway@redhat.com> - 0.2-1
- Bumped version number for rhm dependencies.
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 \