summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SemanticState.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-03-06 11:44:36 +0000
committerGordon Sim <gsim@apache.org>2008-03-06 11:44:36 +0000
commitb7c474ea80fce5d53236aeea9f74c9107da0152d (patch)
tree6d0a36c807c309cdebe3ba18dfe4c0bbbb75bfb8 /cpp/src/qpid/broker/SemanticState.cpp
parent7e162fa97ef0d430714b9630121a055fe5adece9 (diff)
downloadqpid-python-b7c474ea80fce5d53236aeea9f74c9107da0152d.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/broker/SemanticState.cpp')
-rw-r--r--cpp/src/qpid/broker/SemanticState.cpp10
1 files changed, 8 insertions, 2 deletions
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<Message> msg) {
}
void SemanticState::route(intrusive_ptr<Message> msg, Deliverable& strategy) {
- std::string exchangeName = msg->getExchangeName();
- msg->getProperties<DeliveryProperties>()->setExchange(exchangeName);
+ std::string exchangeName = msg->getExchangeName();
+ if (msg->isA<MessageTransferBody>()) {
+ msg->getProperties<DeliveryProperties>()->setExchange(exchangeName);
+ } else if (msg->isA<Message010TransferBody>()) {
+ msg->getProperties<DeliveryProperties010>()->setExchange(exchangeName);
+ }
if (!cacheExchange || cacheExchange->getName() != exchangeName){
cacheExchange = session.getBroker().getExchanges().get(exchangeName);
}