From 07c8c499649c725a226eeda3e0bfe58fa8ba984c Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 5 Jul 2007 09:47:07 +0000 Subject: Fix for QPID-534. Get now detects closure correctly. Also fixed broker to allow channel.close-ok (and fixed client to send it). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553441 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ClientChannel.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client/ClientChannel.h') diff --git a/cpp/src/qpid/client/ClientChannel.h b/cpp/src/qpid/client/ClientChannel.h index 4faf778d28..cea1245e6a 100644 --- a/cpp/src/qpid/client/ClientChannel.h +++ b/cpp/src/qpid/client/ClientChannel.h @@ -27,6 +27,7 @@ #include "ClientMessage.h" #include "ClientQueue.h" #include "ResponseHandler.h" +#include "qpid/Exception.h" #include "qpid/framing/ChannelAdapter.h" #include "qpid/sys/Thread.h" #include "AckMode.h" @@ -58,7 +59,7 @@ class Channel : public framing::ChannelAdapter struct UnknownMethod {}; typedef shared_ptr MethodPtr; - sys::Mutex lock; + mutable sys::Mutex lock; boost::scoped_ptr messaging; Connection* connection; sys::Thread dispatcher; @@ -68,12 +69,20 @@ class Channel : public framing::ChannelAdapter const bool transactional; framing::ProtocolVersion version; + uint16_t errorCode; + std::string errorText; + + sys::Mutex stopLock; + bool running; + + void stop(); + void handleHeader(framing::AMQHeaderBody::shared_ptr body); void handleContent(framing::AMQContentBody::shared_ptr body); void handleHeartbeat(framing::AMQHeartbeatBody::shared_ptr body); void handleMethodInContext( framing::AMQMethodBody::shared_ptr, const framing::MethodContext&); - void handleChannel(framing::AMQMethodBody::shared_ptr method); + void handleChannel(framing::AMQMethodBody::shared_ptr method, const framing::MethodContext& ctxt); void handleConnection(framing::AMQMethodBody::shared_ptr method); void setQos(); -- cgit v1.2.1