diff options
author | Gordon Sim <gsim@apache.org> | 2006-10-31 18:33:40 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2006-10-31 18:33:40 +0000 |
commit | 0487ea40bc6568765cdec75a36273eeb26fae854 (patch) | |
tree | 02a18d9d2dfe1852013633320a858970fc784fd4 /cpp/src/qpid/broker/Channel.cpp | |
parent | 1150be6d66a943d899e25af4cb876e7f68c657d9 (diff) | |
download | qpid-python-0487ea40bc6568765cdec75a36273eeb26fae854.tar.gz |
Hid locking within exchange registry, switched to shared_ptr for exchanges, added some extra error handling and tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@469599 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Channel.cpp')
-rw-r--r-- | cpp/src/qpid/broker/Channel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/Channel.cpp b/cpp/src/qpid/broker/Channel.cpp index c40811e921..eae0a743db 100644 --- a/cpp/src/qpid/broker/Channel.cpp +++ b/cpp/src/qpid/broker/Channel.cpp @@ -155,7 +155,7 @@ void Channel::ConsumerImpl::requestDispatch(){ if(blocked) queue->dispatch(); } -void Channel::handlePublish(Message* _message, Exchange* _exchange){ +void Channel::handlePublish(Message* _message, Exchange::shared_ptr _exchange){ Message::shared_ptr message(_message); exchange = _exchange; messageBuilder.initialise(message); @@ -179,7 +179,7 @@ void Channel::complete(Message::shared_ptr& msg){ DeliverableMessage deliverable(msg); exchange->route(deliverable, msg->getRoutingKey(), &(msg->getHeaderProperties()->getHeaders())); } - exchange = 0; + exchange.reset(); }else{ std::cout << "Exchange not known in Channel::complete(Message::shared_ptr&)" << std::endl; } |