diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/broker/SemanticState.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/broker/SessionContext.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index c6c0ae5440..9b44f31e14 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/cpp/src/qpid/broker/SemanticState.cpp @@ -326,7 +326,7 @@ void SemanticState::cancel(ConsumerImpl& c) if(queue) { queue->cancel(c); if (queue->canAutoDelete() && !queue->hasExclusiveOwner()) { - Queue::tryAutoDelete(getSession().getConnection().getBroker(), queue); + Queue::tryAutoDelete(session.getBroker(), queue); } } } @@ -347,7 +347,7 @@ void SemanticState::route(intrusive_ptr<Message> msg, Deliverable& strategy) { std::string exchangeName = msg->getExchangeName(); msg->getProperties<DeliveryProperties>()->setExchange(exchangeName); if (!cacheExchange || cacheExchange->getName() != exchangeName){ - cacheExchange = session.getConnection().broker.getExchanges().get(exchangeName); + cacheExchange = session.getBroker().getExchanges().get(exchangeName); } cacheExchange->route(strategy, msg->getRoutingKey(), msg->getApplicationHeaders()); @@ -579,7 +579,7 @@ Queue::shared_ptr SemanticState::getQueue(const string& name) const { if (name.empty()) { throw NotAllowedException(QPID_MSG("No queue name specified.")); } else { - queue = session.getConnection().getBroker().getQueues().find(name); + queue = session.getBroker().getQueues().find(name); if (!queue) throw NotFoundException(QPID_MSG("Queue not found: "<<name)); } diff --git a/cpp/src/qpid/broker/SessionContext.h b/cpp/src/qpid/broker/SessionContext.h index 63dd02cede..a289310b15 100644 --- a/cpp/src/qpid/broker/SessionContext.h +++ b/cpp/src/qpid/broker/SessionContext.h @@ -40,6 +40,7 @@ class SessionContext : public sys::OutputControl virtual ~SessionContext(){} virtual ConnectionState& getConnection() = 0; virtual framing::AMQP_ClientProxy& getProxy() = 0; + virtual Broker& getBroker() = 0; }; }} // namespace qpid::broker |