summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/src/qpid/broker/DeliveryRecord.cpp5
-rw-r--r--cpp/src/qpid/broker/DeliveryRecord.h3
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp5
-rw-r--r--cpp/src/qpid/cluster/Connection.h3
-rw-r--r--cpp/src/qpid/cluster/DumpClient.cpp4
-rw-r--r--cpp/xml/cluster.xml1
6 files changed, 14 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/DeliveryRecord.cpp b/cpp/src/qpid/broker/DeliveryRecord.cpp
index 900016d381..e68cc79d8b 100644
--- a/cpp/src/qpid/broker/DeliveryRecord.cpp
+++ b/cpp/src/qpid/broker/DeliveryRecord.cpp
@@ -35,7 +35,8 @@ DeliveryRecord::DeliveryRecord(const QueuedMessage& _msg,
const std::string& _tag,
bool _acquired,
bool accepted,
- bool _windowing) : msg(_msg),
+ bool _windowing,
+ uint32_t _credit) : msg(_msg),
queue(_queue),
tag(_tag),
acquired(_acquired),
@@ -44,7 +45,7 @@ DeliveryRecord::DeliveryRecord(const QueuedMessage& _msg,
completed(false),
ended(accepted),
windowing(_windowing),
- credit(msg.payload ? msg.payload->getRequiredCredit() : 0)
+ credit(msg.payload ? msg.payload->getRequiredCredit() : _credit)
{}
void DeliveryRecord::setEnded()
diff --git a/cpp/src/qpid/broker/DeliveryRecord.h b/cpp/src/qpid/broker/DeliveryRecord.h
index 952e888c03..4b372b2cfa 100644
--- a/cpp/src/qpid/broker/DeliveryRecord.h
+++ b/cpp/src/qpid/broker/DeliveryRecord.h
@@ -80,7 +80,8 @@ class DeliveryRecord
const std::string& tag,
bool acquired,
bool accepted,
- bool windowing
+ bool windowing,
+ uint32_t credit=0 // Only used if msg is empty.
);
bool matches(DeliveryId tag) const;
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index ddfba03850..9c0b371066 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/cpp/src/qpid/cluster/Connection.cpp
@@ -280,7 +280,8 @@ void Connection::deliveryRecord(const string& qname,
bool cancelled,
bool completed,
bool ended,
- bool windowing)
+ bool windowing,
+ uint32_t credit)
{
broker::QueuedMessage m;
broker::Queue::shared_ptr queue = findQueue(qname);
@@ -293,7 +294,7 @@ void Connection::deliveryRecord(const string& qname,
throw Exception(QPID_MSG("deliveryRecord no dump message"));
}
- broker::DeliveryRecord dr(m, queue, tag, acquired, accepted, windowing);
+ broker::DeliveryRecord dr(m, queue, tag, acquired, accepted, windowing, credit);
dr.setId(id);
if (cancelled) dr.cancel(dr.getTag());
if (completed) dr.complete();
diff --git a/cpp/src/qpid/cluster/Connection.h b/cpp/src/qpid/cluster/Connection.h
index 06176bf81d..4d06848ae6 100644
--- a/cpp/src/qpid/cluster/Connection.h
+++ b/cpp/src/qpid/cluster/Connection.h
@@ -124,7 +124,8 @@ class Connection :
bool cancelled,
bool completed,
bool ended,
- bool windowing);
+ bool windowing,
+ uint32_t credit);
void queuePosition(const std::string&, const framing::SequenceNumber&);
diff --git a/cpp/src/qpid/cluster/DumpClient.cpp b/cpp/src/qpid/cluster/DumpClient.cpp
index bb3cfdfa56..18db83ba87 100644
--- a/cpp/src/qpid/cluster/DumpClient.cpp
+++ b/cpp/src/qpid/cluster/DumpClient.cpp
@@ -308,7 +308,9 @@ void DumpClient::dumpUnacked(const broker::DeliveryRecord& dr) {
dr.isCancelled(),
dr.isComplete(),
dr.isEnded(),
- dr.isWindowing());
+ dr.isWindowing(),
+ dr.getCredit()
+ );
}
class TxOpDumper : public broker::TxOpConstVisitor, public MessageDumper {
diff --git a/cpp/xml/cluster.xml b/cpp/xml/cluster.xml
index 549914268b..d553ecb492 100644
--- a/cpp/xml/cluster.xml
+++ b/cpp/xml/cluster.xml
@@ -94,6 +94,7 @@
<field name="completed" type="bit"/>
<field name="ended" type="bit"/>
<field name="windowing" type="bit"/>
+ <field name="credit" type="uint32"/>
</control>
<!-- Tx transaction state. -->