summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/BrokerChannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/lib/broker/BrokerChannel.cpp')
-rw-r--r--cpp/lib/broker/BrokerChannel.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/cpp/lib/broker/BrokerChannel.cpp b/cpp/lib/broker/BrokerChannel.cpp
index 954eb391ea..ba1ccb7031 100644
--- a/cpp/lib/broker/BrokerChannel.cpp
+++ b/cpp/lib/broker/BrokerChannel.cpp
@@ -82,10 +82,11 @@ void Channel::consume(string& tag, Queue::shared_ptr queue, bool acks,
ConsumerImpl* c(new ConsumerImpl(this, tag, queue, connection, acks));
try{
queue->consume(c, exclusive);//may throw exception
- consumers[tag] = c;
- }catch(ExclusiveAccessException& e){
+ consumers[tag] = c;
+ } catch(...) {
+ // FIXME aconway 2007-02-06: auto_ptr for exception safe mem. mgmt.
delete c;
- throw e;
+ throw;
}
}
@@ -190,11 +191,11 @@ void Channel::ConsumerImpl::requestDispatch(){
void Channel::handleInlineTransfer(Message::shared_ptr& msg, Exchange::shared_ptr& exch){
if(transactional){
TxPublish* deliverable = new TxPublish(msg);
- exch->route(*deliverable, msg->getRoutingKey(), &(msg->getHeaderProperties()->getHeaders()));
+ exch->route(*deliverable, msg->getRoutingKey(), &(msg->getApplicationHeaders()));
txBuffer.enlist(new DeletingTxOp(deliverable));
}else{
DeliverableMessage deliverable(msg);
- exch->route(deliverable, msg->getRoutingKey(), &(msg->getHeaderProperties()->getHeaders()));
+ exch->route(deliverable, msg->getRoutingKey(), &(msg->getApplicationHeaders()));
}
}
@@ -227,12 +228,12 @@ void Channel::complete(Message::shared_ptr msg) {
if(transactional) {
std::auto_ptr<TxPublish> deliverable(new TxPublish(msg));
exchange->route(*deliverable, msg->getRoutingKey(),
- &(msg->getHeaderProperties()->getHeaders()));
+ &(msg->getApplicationHeaders()));
txBuffer.enlist(new DeletingTxOp(deliverable.release()));
} else {
DeliverableMessage deliverable(msg);
exchange->route(deliverable, msg->getRoutingKey(),
- &(msg->getHeaderProperties()->getHeaders()));
+ &(msg->getApplicationHeaders()));
}
}