From b7c474ea80fce5d53236aeea9f74c9107da0152d Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 6 Mar 2008 11:44:36 +0000 Subject: Fix message delivery for 0-10 final codepath Convert two more python tests to use 0-10 client git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@634229 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SemanticState.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/broker/SemanticState.cpp') diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index e012d693fb..b56b152397 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/cpp/src/qpid/broker/SemanticState.cpp @@ -32,6 +32,8 @@ #include "TxAck.h" #include "TxPublish.h" #include "qpid/framing/reply_exceptions.h" +#include "qpid/framing/MessageTransferBody.h" +#include "qpid/framing/Message010TransferBody.h" #include "qpid/log/Statement.h" #include "qpid/ptr_map.h" @@ -344,8 +346,12 @@ void SemanticState::handle(intrusive_ptr msg) { } void SemanticState::route(intrusive_ptr msg, Deliverable& strategy) { - std::string exchangeName = msg->getExchangeName(); - msg->getProperties()->setExchange(exchangeName); + std::string exchangeName = msg->getExchangeName(); + if (msg->isA()) { + msg->getProperties()->setExchange(exchangeName); + } else if (msg->isA()) { + msg->getProperties()->setExchange(exchangeName); + } if (!cacheExchange || cacheExchange->getName() != exchangeName){ cacheExchange = session.getBroker().getExchanges().get(exchangeName); } -- cgit v1.2.1