From 0fa9f4026bade25610d8dbb697a52ccb821aef16 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@463179 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/broker/src/Channel.cpp | 2 +- qpid/cpp/broker/test/ChannelTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'qpid/cpp') diff --git a/qpid/cpp/broker/src/Channel.cpp b/qpid/cpp/broker/src/Channel.cpp index 7bc6d599e9..34d69716c4 100644 --- a/qpid/cpp/broker/src/Channel.cpp +++ b/qpid/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/qpid/cpp/broker/test/ChannelTest.cpp b/qpid/cpp/broker/test/ChannelTest.cpp index 45498989f2..001a0d9c00 100644 --- a/qpid/cpp/broker/test/ChannelTest.cpp +++ b/qpid/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