summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid/broker/DeliveryRecord.cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/DeliveryRecord.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp b/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
index d0a450ce1e..1f2b259689 100644
--- a/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
+++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
@@ -113,14 +113,13 @@ void DeliveryRecord::complete() {
/** Accept msg, and optionally notify caller when dequeue completes */
boost::intrusive_ptr<Queue::DequeueCompletion>
DeliveryRecord::accept(TransactionContext* ctxt) {
- static const boost::intrusive_ptr<Queue::DequeueCompletion> empty;
+ boost::intrusive_ptr<Queue::DequeueCompletion> dq;
if (acquired && !ended) {
QPID_LOG(debug, "Accepted " << id);
- boost::intrusive_ptr<Queue::DequeueCompletion> dq(queue->dequeue(ctxt, msg));
+ dq = queue->dequeue(ctxt, msg);
setEnded();
- return dq;
}
- return empty;
+ return dq;
}
void DeliveryRecord::dequeue(TransactionContext* ctxt) const{