Author: aconway
Date: Mon May 4 16:37:21 2009
New Revision: 771354
URL: http://svn.apache.org/viewvc?rev=771354&view=rev
Log:
Undo buggy commit 770802.
Modified:
qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h
qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h?rev=771354&r1=771353&r2=771354&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h Mon May 4 16:37:21
2009
@@ -40,10 +40,11 @@
/**
* Record of a delivery for which an ack is outstanding.
*/
-class DeliveryRecord {
+class DeliveryRecord
+{
QueuedMessage msg;
mutable Queue::shared_ptr queue;
- std::string tag;
+ const std::string tag;
DeliveryId id;
bool acquired;
bool acceptExpected;
@@ -51,7 +52,7 @@
bool completed;
bool ended;
- bool windowing;
+ const bool windowing;
/**
* Record required credit on construction as the pointer to the
@@ -60,7 +61,7 @@
* to reallocate credit when it is completed (which could happen
* after that).
*/
- uint32_t credit;
+ const uint32_t credit;
public:
QPID_BROKER_EXTERN DeliveryRecord(const QueuedMessage& msg,
@@ -103,7 +104,7 @@
void deliver(framing::FrameHandler& h, DeliveryId deliveryId, uint16_t
framesize);
void setId(DeliveryId _id) { id = _id; }
- typedef std::deque<DeliveryRecord> DeliveryRecords;
+ typedef std::list<DeliveryRecord> DeliveryRecords;
static AckRange findRange(DeliveryRecords& records, DeliveryId first,
DeliveryId last);
const QueuedMessage& getMessage() const { return msg; }
framing::SequenceNumber getId() const { return id; }
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=771354&r1=771353&r2=771354&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Mon May 4 16:37:21
2009
@@ -440,7 +440,7 @@
//unconfirmed messages re redelivered and therefore have their
//id adjusted, confirmed messages are not and so the ordering
//w.r.t id is lost
- std::sort(unacked.begin(), unacked.end());
+ unacked.sort();
}
}
@@ -642,12 +642,12 @@
//if the messages are already completed, they can be
//removed from the record
- unacked.erase(std::remove_if(unacked.begin(), unacked.end(),
mem_fun_ref(&DeliveryRecord::isRedundant)), unacked.end());
+ unacked.remove_if(mem_fun_ref(&DeliveryRecord::isRedundant));
}
} else {
for_each(range.start, range.end, boost::bind(&DeliveryRecord::accept,
_1, (TransactionContext*) 0));
- unacked.erase(std::remove_if(unacked.begin(), unacked.end(),
mem_fun_ref(&DeliveryRecord::isRedundant)), unacked.end());
+ unacked.remove_if(mem_fun_ref(&DeliveryRecord::isRedundant));
}
}
@@ -655,7 +655,7 @@
{
AckRange range = findRange(first, last);
for_each(range.start, range.end, boost::bind(&SemanticState::complete,
this, _1));
- unacked.erase(std::remove_if(unacked.begin(), unacked.end(),
mem_fun_ref(&DeliveryRecord::isRedundant)), unacked.end());
+ unacked.remove_if(mem_fun_ref(&DeliveryRecord::isRedundant));
requestDispatch();
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]