diff options
Diffstat (limited to 'cpp/src/qpid/amqp_0_10')
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/Codecs.cpp | 6 | ||||
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 8 | ||||
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/SessionHandler.h | 6 |
3 files changed, 9 insertions, 11 deletions
diff --git a/cpp/src/qpid/amqp_0_10/Codecs.cpp b/cpp/src/qpid/amqp_0_10/Codecs.cpp index 0fbe2a60b9..b976a5d09b 100644 --- a/cpp/src/qpid/amqp_0_10/Codecs.cpp +++ b/cpp/src/qpid/amqp_0_10/Codecs.cpp @@ -127,10 +127,10 @@ Variant toVariant(boost::shared_ptr<FieldValue> in) switch (in->getType()) { //Fixed Width types: case 0x01: out.setEncoding(amqp0_10_binary); - case 0x02: out = in->getIntegerValue<int8_t, 1>(); break; - case 0x03: out = in->getIntegerValue<uint8_t, 1>(); break; + case 0x02: out = in->getIntegerValue<int8_t>(); break; + case 0x03: out = in->getIntegerValue<uint8_t>(); break; case 0x04: break; //TODO: iso-8859-15 char - case 0x08: out = static_cast<bool>(in->getIntegerValue<uint8_t, 1>()); break; + case 0x08: out = static_cast<bool>(in->getIntegerValue<uint8_t>()); break; case 0x10: out.setEncoding(amqp0_10_binary); case 0x11: out = in->getIntegerValue<int16_t, 2>(); break; case 0x12: out = in->getIntegerValue<uint16_t, 2>(); break; diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp index b113d49a73..578598a146 100644 --- a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp +++ b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp @@ -130,9 +130,6 @@ void SessionHandler::handleException(const qpid::SessionException& e) } namespace { -bool isControl(const AMQFrame& f) { - return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_CONTROL; -} bool isCommand(const AMQFrame& f) { return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_COMMAND; } @@ -191,9 +188,10 @@ void SessionHandler::detach(const std::string& name) { void SessionHandler::detached(const std::string& name, uint8_t code) { CHECK_NAME(name, "session.detached"); awaitingDetached = false; - if (code != session::DETACH_CODE_NORMAL) + if (code != session::DETACH_CODE_NORMAL) { + sendReady = receiveReady = false; channelException(convert(code), "session.detached from peer."); - else { + } else { handleDetach(); } } diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.h b/cpp/src/qpid/amqp_0_10/SessionHandler.h index a87a1a155f..8b072fa05c 100644 --- a/cpp/src/qpid/amqp_0_10/SessionHandler.h +++ b/cpp/src/qpid/amqp_0_10/SessionHandler.h @@ -41,8 +41,8 @@ namespace amqp_0_10 { * to a session state. */ -class SessionHandler : public framing::AMQP_AllOperations::SessionHandler, - public framing::FrameHandler::InOutHandler +class QPID_COMMON_CLASS_EXTERN SessionHandler : public framing::AMQP_AllOperations::SessionHandler, + public framing::FrameHandler::InOutHandler { public: QPID_COMMON_EXTERN SessionHandler(framing::FrameHandler* out=0, uint16_t channel=0); @@ -66,7 +66,7 @@ class SessionHandler : public framing::AMQP_AllOperations::SessionHandler, QPID_COMMON_EXTERN void handleException(const qpid::SessionException& e); /** True if the handler is ready to send and receive */ - bool ready() const; + QPID_COMMON_EXTERN bool ready() const; // Protocol methods QPID_COMMON_EXTERN void attach(const std::string& name, bool force); |
