diff options
author | Alan Conway <aconway@apache.org> | 2007-01-31 20:17:14 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-01-31 20:17:14 +0000 |
commit | ee4d5ffba8167348ea2751202c6065e8de0fc92c (patch) | |
tree | 2f29c85f1eccdfcd3115bc5705c13b47d8956105 | |
parent | 9cdf50e9bbf4aae222600245691f9b1d3acb3147 (diff) | |
download | qpid-python-ee4d5ffba8167348ea2751202c6065e8de0fc92c.tar.gz |
Trivial FIXMEs.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501973 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/lib/broker/BrokerAdapter.h | 11 | ||||
-rw-r--r-- | cpp/lib/broker/BrokerChannel.h | 1 | ||||
-rw-r--r-- | cpp/lib/broker/Connection.h | 4 | ||||
-rw-r--r-- | cpp/lib/client/Connection.cpp | 1 | ||||
-rw-r--r-- | cpp/lib/common/framing/AMQMethodBody.h | 2 | ||||
-rw-r--r-- | cpp/lib/common/framing/Responder.cpp | 10 |
6 files changed, 14 insertions, 15 deletions
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<Channel> ch, Connection&, Broker&); Channel& getChannel() { return *channel; } - void handleHeader(boost::shared_ptr<qpid::framing::AMQHeaderBody>); - void handleContent(boost::shared_ptr<qpid::framing::AMQContentBody>); - void handleHeartbeat(boost::shared_ptr<qpid::framing::AMQHeartbeatBody>); + void handleHeader(boost::shared_ptr<framing::AMQHeaderBody>); + void handleContent(boost::shared_ptr<framing::AMQContentBody>); + void handleHeartbeat(boost::shared_ptr<framing::AMQHeartbeatBody>); bool isOpen() const; private: void handleMethodInContext( - boost::shared_ptr<qpid::framing::AMQMethodBody> method, + boost::shared_ptr<framing::AMQMethodBody> 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 <AMQHeaderBody.h> #include <AMQHeartbeatBody.h> #include <BasicPublishBody.h> -#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<qpid::framing::AMQP_ClientProxy> client; Settings settings; - // FIXME aconway 2007-01-16: Belongs on broker? + std::vector<Queue::shared_ptr> 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<u_int16_t, BrokerAdapter> AdapterMap; - // FIXME aconway 2007-01-16: on broker. typedef std::vector<Queue::shared_ptr>::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 <class T> 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 <boost/format.hpp> #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; } |