summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SemanticState.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-10-23 14:50:56 +0000
committerGordon Sim <gsim@apache.org>2007-10-23 14:50:56 +0000
commit47c3698db7e5a52a7958ebb635e736b2f95df1f9 (patch)
tree0f2c5026876d5ef822c93c1d6d95f26757735085 /cpp/src/qpid/broker/SemanticState.cpp
parent6b509c871fae213fc2cf6b434e670c8d3bd953b4 (diff)
downloadqpid-python-47c3698db7e5a52a7958ebb635e736b2f95df1f9.tar.gz
Hack for no-local when used with jms topics
Fix for releasing of exclusive ownership of queues second time around git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@587525 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SemanticState.cpp')
-rw-r--r--cpp/src/qpid/broker/SemanticState.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp
index f47726bcf8..1f7436da94 100644
--- a/cpp/src/qpid/broker/SemanticState.cpp
+++ b/cpp/src/qpid/broker/SemanticState.cpp
@@ -260,12 +260,20 @@ bool SemanticState::ConsumerImpl::deliver(QueuedMessage& msg)
parent->deliveryAdapter.deliver(msg.payload, token);
if (windowing || ackExpected) {
parent->record(DeliveryRecord(msg, queue, name, token, deliveryTag, acquire, !ackExpected));
+ } else if (!ackExpected) {
+ queue->dequeue(0, msg.payload);
}
}
return !blocked;
}
}
+bool SemanticState::ConsumerImpl::filter(Message::shared_ptr msg)
+{
+ return !(nolocal &&
+ &parent->getSession().getConnection() == msg->getPublisher());
+}
+
bool SemanticState::ConsumerImpl::checkCredit(Message::shared_ptr& msg)
{
Mutex::ScopedLock l(lock);