diff options
| author | Gordon Sim <gsim@apache.org> | 2007-07-05 09:47:07 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-07-05 09:47:07 +0000 |
| commit | 07c8c499649c725a226eeda3e0bfe58fa8ba984c (patch) | |
| tree | 0f71fc80b9e6e9929184334f4dc7d8fc03f7ccc0 /cpp/src/qpid/client/ClientChannel.h | |
| parent | d4be469092c558ca9031d82b963b8b845fa1e1bd (diff) | |
| download | qpid-python-07c8c499649c725a226eeda3e0bfe58fa8ba984c.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/client/ClientChannel.h')
| -rw-r--r-- | cpp/src/qpid/client/ClientChannel.h | 13 |
1 files changed, 11 insertions, 2 deletions
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<framing::AMQMethodBody> MethodPtr; - sys::Mutex lock; + mutable sys::Mutex lock; boost::scoped_ptr<MessageChannel> 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(); |
