From af5784ad936f12da595618a48214a83c64acdbfb Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 12 Oct 2006 10:04:53 +0000 Subject: Fixed bug causing ChannelTest.testDeliveryNoAck to fail intermittently. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@463179 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/broker/src/Channel.cpp | 2 +- cpp/broker/test/ChannelTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp') diff --git a/cpp/broker/src/Channel.cpp b/cpp/broker/src/Channel.cpp index 7bc6d599e9..34d69716c4 100644 --- a/cpp/broker/src/Channel.cpp +++ b/cpp/broker/src/Channel.cpp @@ -124,7 +124,7 @@ Channel::ConsumerImpl::ConsumerImpl(Channel* _parent, string& _tag, } bool Channel::ConsumerImpl::deliver(Message::shared_ptr& msg){ - if(connection != msg->getPublisher()){//check for no_local + if(!connection || connection != msg->getPublisher()){//check for no_local if(ackExpected && !parent->checkPrefetch(msg)){ blocked = true; }else{ diff --git a/cpp/broker/test/ChannelTest.cpp b/cpp/broker/test/ChannelTest.cpp index 45498989f2..001a0d9c00 100644 --- a/cpp/broker/test/ChannelTest.cpp +++ b/cpp/broker/test/ChannelTest.cpp @@ -108,7 +108,7 @@ class ChannelTest : public CppUnit::TestCase msg->addContent(body); Queue::shared_ptr queue(new Queue("my_queue")); - ConnectionToken* owner; + ConnectionToken* owner(0); string tag("no_ack"); channel.consume(tag, queue, false, false, owner); -- cgit v1.2.1