From ee4d5ffba8167348ea2751202c6065e8de0fc92c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 31 Jan 2007 20:17:14 +0000 Subject: Trivial FIXMEs. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501973 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/BrokerAdapter.h | 11 ++++++----- cpp/lib/broker/BrokerChannel.h | 1 - cpp/lib/broker/Connection.h | 4 +--- cpp/lib/client/Connection.cpp | 1 + cpp/lib/common/framing/AMQMethodBody.h | 2 -- cpp/lib/common/framing/Responder.cpp | 10 ++++++---- 6 files changed, 14 insertions(+), 15 deletions(-) (limited to 'cpp') diff --git a/cpp/lib/broker/BrokerAdapter.h b/cpp/lib/broker/BrokerAdapter.h index b797576b39..72c09be849 100644 --- a/cpp/lib/broker/BrokerAdapter.h +++ b/cpp/lib/broker/BrokerAdapter.h @@ -24,6 +24,7 @@ #include "BodyHandler.h" #include "BrokerChannel.h" #include "amqp_types.h" +#include "framing/ChannelAdapter.h" namespace qpid { namespace broker { @@ -40,21 +41,21 @@ class Broker; * * Owns a channel, has references to Connection and Broker. */ -class BrokerAdapter : public qpid::framing::ChannelAdapter +class BrokerAdapter : public framing::ChannelAdapter { public: BrokerAdapter(std::auto_ptr ch, Connection&, Broker&); Channel& getChannel() { return *channel; } - void handleHeader(boost::shared_ptr); - void handleContent(boost::shared_ptr); - void handleHeartbeat(boost::shared_ptr); + void handleHeader(boost::shared_ptr); + void handleContent(boost::shared_ptr); + void handleHeartbeat(boost::shared_ptr); bool isOpen() const; private: void handleMethodInContext( - boost::shared_ptr method, + boost::shared_ptr method, const framing::MethodContext& context); class ServerOps; diff --git a/cpp/lib/broker/BrokerChannel.h b/cpp/lib/broker/BrokerChannel.h index e578101cfa..4e64d148e8 100644 --- a/cpp/lib/broker/BrokerChannel.h +++ b/cpp/lib/broker/BrokerChannel.h @@ -47,7 +47,6 @@ #include #include #include -#include "ChannelAdapter.h" namespace qpid { namespace broker { diff --git a/cpp/lib/broker/Connection.h b/cpp/lib/broker/Connection.h index 08d14d795a..d2b0422f8d 100644 --- a/cpp/lib/broker/Connection.h +++ b/cpp/lib/broker/Connection.h @@ -70,10 +70,9 @@ class Connection : public qpid::sys::ConnectionInputHandler, Broker& broker; std::auto_ptr client; Settings settings; - // FIXME aconway 2007-01-16: Belongs on broker? + std::vector exclusiveQueues; - // FIXME aconway 2007-01-16: move to broker. /** * Get named queue, never returns 0. * @return: named queue or default queue for channel if name="" @@ -89,7 +88,6 @@ class Connection : public qpid::sys::ConnectionInputHandler, private: typedef boost::ptr_map AdapterMap; - // FIXME aconway 2007-01-16: on broker. typedef std::vector::iterator queue_iterator; Exchange::shared_ptr findExchange(const string& name); diff --git a/cpp/lib/client/Connection.cpp b/cpp/lib/client/Connection.cpp index 0b2859387f..0fafd29b90 100644 --- a/cpp/lib/client/Connection.cpp +++ b/cpp/lib/client/Connection.cpp @@ -113,6 +113,7 @@ void Connection::erase(ChannelId id) { } void Connection::received(AMQFrame* frame){ + // FIXME aconway 2007-01-25: Mutex ChannelId id = frame->getChannel(); Channel* channel = channels[id]; // FIXME aconway 2007-01-26: Exception thrown here is hanging the diff --git a/cpp/lib/common/framing/AMQMethodBody.h b/cpp/lib/common/framing/AMQMethodBody.h index d9f028c786..b21ae379dc 100644 --- a/cpp/lib/common/framing/AMQMethodBody.h +++ b/cpp/lib/common/framing/AMQMethodBody.h @@ -53,8 +53,6 @@ class AMQMethodBody : public AMQBody virtual void invoke(AMQP_ServerOperations&, const MethodContext&); - // FIXME aconway 2007-01-24: remove match, use isA - bool match(AMQMethodBody* other) const; template bool isA() { return amqpClassId()==T::CLASS_ID && amqpMethodId()==T::METHOD_ID; } diff --git a/cpp/lib/common/framing/Responder.cpp b/cpp/lib/common/framing/Responder.cpp index 459b9bc8e4..c8c5ce8dcc 100644 --- a/cpp/lib/common/framing/Responder.cpp +++ b/cpp/lib/common/framing/Responder.cpp @@ -15,6 +15,7 @@ * limitations under the License. * */ +#include #include "Responder.h" #include "QpidError.h" @@ -25,15 +26,16 @@ namespace framing { Responder::Responder() : lastId(0), responseMark(0) {} void Responder::received(const AMQRequestBody::Data& request) { - // FIXME aconway 2007-01-22: Re-insert strict checking when all works. -// if (request.responseMark < responseMark || request.responseMark > lastId) -// THROW_QPID_ERROR(PROTOCOL_ERROR, "Invalid resposne mark"); + if (request.responseMark < responseMark || request.responseMark > lastId) + THROW_QPID_ERROR( + PROTOCOL_ERROR, boost::format("Invalid response mark %d.") + %request.responseMark); responseMark = request.responseMark; } void Responder::sending(AMQResponseBody::Data& response) { response.responseId = ++lastId; - // response.requestId should have been set by caller. + assert(response.requestId); // Should be already set. response.batchOffset = 0; } -- cgit v1.2.1