summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/TxAck.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-12-11 10:44:03 +0000
committerGordon Sim <gsim@apache.org>2006-12-11 10:44:03 +0000
commitf71a9c37caec4b1282f362ef4276bac740e28d8d (patch)
treeeb71bd02eb1fa2e1fbe85b2658990a9e95cf4795 /cpp/lib/broker/TxAck.cpp
parenta52120056649103af256f1f34b5bc574582a7d96 (diff)
downloadqpid-python-f71a9c37caec4b1282f362ef4276bac740e28d8d.tar.gz
Allow xid to be associated with publication and acknowledgements.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@485594 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/broker/TxAck.cpp')
-rw-r--r--cpp/lib/broker/TxAck.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/lib/broker/TxAck.cpp b/cpp/lib/broker/TxAck.cpp
index 2b55b81c58..b5211158f3 100644
--- a/cpp/lib/broker/TxAck.cpp
+++ b/cpp/lib/broker/TxAck.cpp
@@ -25,7 +25,8 @@ using std::bind2nd;
using std::mem_fun_ref;
using namespace qpid::broker;
-TxAck::TxAck(AccumulatedAck& _acked, std::list<DeliveryRecord>& _unacked) : acked(_acked), unacked(_unacked){
+TxAck::TxAck(AccumulatedAck& _acked, std::list<DeliveryRecord>& _unacked, const std::string* const _xid) :
+ acked(_acked), unacked(_unacked), xid(_xid){
}
@@ -34,10 +35,9 @@ bool TxAck::prepare(TransactionContext* ctxt) throw(){
//dequeue all acked messages from their queues
for (ack_iterator i = unacked.begin(); i != unacked.end(); i++) {
if (i->coveredBy(&acked)) {
- i->discard(ctxt);
+ i->discard(ctxt, xid);
}
}
- //for_each(unacked.begin(), unacked.end(), bind2nd(mem_fun_ref(&DeliveryRecord::discardIfCoveredBy), &acked));
return true;
}catch(...){
std::cout << "TxAck::prepare() - Failed to prepare" << std::endl;