diff options
| author | Alan Conway <aconway@apache.org> | 2007-03-13 20:14:31 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-03-13 20:14:31 +0000 |
| commit | 94ab9364be7d70c9bf862c3a447ab31bd480c387 (patch) | |
| tree | 3e61af879795052de2c3482741bbdf0cabe31292 /cpp/lib/broker | |
| parent | bdf3a57b9bad25be4def680d66197ccc4b238788 (diff) | |
| download | qpid-python-94ab9364be7d70c9bf862c3a447ab31bd480c387.tar.gz | |
Merged revisions 496317 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid
........
r496317 | aconway | 2007-01-15 08:58:07 -0500 (Mon, 15 Jan 2007) | 12 lines
2006-12-08 Jim Meyering <meyering@redhat.com>
Ensure that AccumulatedAck.range is not used uninitialized.
* lib/broker/AccumulatedAck.h (AccumulatedAck): Make this a class,
rather than a struct.
(AccumulatedAck::AccumulatedAck): Add a constructor to require
initialization of the "range" member.
* lib/broker/BrokerChannel.cpp (Channel) [accumulatedAck]: Initialize.
* tests/TxAckTest.cpp (TxAckTest) [acked]: Likewise.
* tests/AccumulatedAckTest.cpp (testCovers): Initialize local.
(testUpdateAndConsolidate): Likewise.
........
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@517849 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/broker')
| -rw-r--r-- | cpp/lib/broker/AccumulatedAck.h | 4 | ||||
| -rw-r--r-- | cpp/lib/broker/BrokerChannel.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/cpp/lib/broker/AccumulatedAck.h b/cpp/lib/broker/AccumulatedAck.h index 6ab0cfbe2e..eaae652a30 100644 --- a/cpp/lib/broker/AccumulatedAck.h +++ b/cpp/lib/broker/AccumulatedAck.h @@ -31,7 +31,8 @@ namespace qpid { * Keeps an accumulated record of acked messages (by delivery * tag). */ - struct AccumulatedAck{ + class AccumulatedAck { + public: /** * If not zero, then everything up to this value has been * acked. @@ -43,6 +44,7 @@ namespace qpid { */ std::list<u_int64_t> individual; + AccumulatedAck(u_int64_t r) : range(r) {} void update(u_int64_t firstTag, u_int64_t lastTag); void consolidate(); void clear(); diff --git a/cpp/lib/broker/BrokerChannel.cpp b/cpp/lib/broker/BrokerChannel.cpp index ddf9ad0e3c..47f6686b9e 100644 --- a/cpp/lib/broker/BrokerChannel.cpp +++ b/cpp/lib/broker/BrokerChannel.cpp @@ -60,6 +60,7 @@ Channel::Channel( prefetchCount(0), framesize(_framesize), tagGenerator("sgen"), + accumulatedAck(0), store(_store), messageBuilder(this, _store, _stagingThreshold), opened(id == 0),//channel 0 is automatically open, other must be explicitly opened |
