summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-10-18 08:28:37 +0000
committerGordon Sim <gsim@apache.org>2007-10-18 08:28:37 +0000
commitd36b5cfeb82653eeae712a44f011fe50d078aa5c (patch)
tree041f5617668b8a92419986b7ec0836cd2f7d7483
parent7b14c847e3de611d73a41d636c307c7d940e4522 (diff)
downloadqpid-python-d36b5cfeb82653eeae712a44f011fe50d078aa5c.tar.gz
Fix for QPID-644
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@585899 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/broker/DeliveryRecord.h2
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.cpp4
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.h4
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.h b/qpid/cpp/src/qpid/broker/DeliveryRecord.h
index 52e16a0c06..d2a9e38a7c 100644
--- a/qpid/cpp/src/qpid/broker/DeliveryRecord.h
+++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.h
@@ -41,7 +41,7 @@ class SemanticState;
* Record of a delivery for which an ack is outstanding.
*/
class DeliveryRecord{
- mutable QueuedMessage msg;
+ QueuedMessage msg;
mutable Queue::shared_ptr queue;
const std::string tag;
DeliveryToken::shared_ptr token;
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp
index 8c990795e7..1dad0e1864 100644
--- a/qpid/cpp/src/qpid/broker/Queue.cpp
+++ b/qpid/cpp/src/qpid/broker/Queue.cpp
@@ -318,7 +318,7 @@ bool Queue::canAutoDelete() const{
}
// return true if store exists,
-bool Queue::enqueue(TransactionContext* ctxt, Message::shared_ptr& msg)
+bool Queue::enqueue(TransactionContext* ctxt, Message::shared_ptr msg)
{
if (msg->isPersistent() && store) {
msg->enqueueAsync(); //increment to async counter -- for message sent to more than one queue
@@ -329,7 +329,7 @@ bool Queue::enqueue(TransactionContext* ctxt, Message::shared_ptr& msg)
}
// return true if store exists,
-bool Queue::dequeue(TransactionContext* ctxt, Message::shared_ptr& msg)
+bool Queue::dequeue(TransactionContext* ctxt, Message::shared_ptr msg)
{
if (msg->isPersistent() && store) {
msg->dequeueAsync(); //increment to async counter -- for message sent to more than one queue
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h
index d3c8fb7e81..c855582dbe 100644
--- a/qpid/cpp/src/qpid/broker/Queue.h
+++ b/qpid/cpp/src/qpid/broker/Queue.h
@@ -177,11 +177,11 @@ namespace qpid {
inline bool isAutoDelete() const { return autodelete; }
bool canAutoDelete() const;
- bool enqueue(TransactionContext* ctxt, Message::shared_ptr& msg);
+ bool enqueue(TransactionContext* ctxt, Message::shared_ptr msg);
/**
* dequeue from store (only done once messages is acknowledged)
*/
- bool dequeue(TransactionContext* ctxt, Message::shared_ptr& msg);
+ bool dequeue(TransactionContext* ctxt, Message::shared_ptr msg);
/**
* dequeues from memory only
*/
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp
index d605e92b72..f47726bcf8 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.cpp
+++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp
@@ -355,7 +355,7 @@ void SemanticState::ack(DeliveryId first, DeliveryId last, bool cumulative)
if (cumulative || first != last) {
//need to find end (position it just after the last record in range)
end = find_if(start, unacked.end(), bind2nd(mem_fun_ref(&DeliveryRecord::after), last));
- } else {
+ } else if (start != unacked.end()) {
//just acked single element (move end past it)
++end;
}