Author: gsim
Date: Thu Oct 18 01:28:37 2007
New Revision: 585899

URL: http://svn.apache.org/viewvc?rev=585899&view=rev
Log:
Fix for QPID-644


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h?rev=585899&r1=585898&r2=585899&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.h Thu Oct 18 
01:28:37 2007
@@ -41,7 +41,7 @@
  * 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;

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=585899&r1=585898&r2=585899&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Thu Oct 18 01:28:37 
2007
@@ -318,7 +318,7 @@
 }
 
 // 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 @@
 }
 
 // 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

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h?rev=585899&r1=585898&r2=585899&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h Thu Oct 18 01:28:37 
2007
@@ -177,11 +177,11 @@
             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
              */

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=585899&r1=585898&r2=585899&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Thu Oct 18 
01:28:37 2007
@@ -355,7 +355,7 @@
         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;
         }


Reply via email to