You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/01/31 21:17:15 UTC
svn commit: r501973 - in /incubator/qpid/branches/qpid.0-9/cpp/lib:
broker/BrokerAdapter.h broker/BrokerChannel.h broker/Connection.h
client/Connection.cpp common/framing/AMQMethodBody.h
common/framing/Responder.cpp
Author: aconway
Date: Wed Jan 31 12:17:14 2007
New Revision: 501973
URL: http://svn.apache.org/viewvc?view=rev&rev=501973
Log:
Trivial FIXMEs.
Modified:
incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerAdapter.h
incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerChannel.h
incubator/qpid/branches/qpid.0-9/cpp/lib/broker/Connection.h
incubator/qpid/branches/qpid.0-9/cpp/lib/client/Connection.cpp
incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/AMQMethodBody.h
incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/Responder.cpp
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerAdapter.h
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerAdapter.h?view=diff&rev=501973&r1=501972&r2=501973
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerAdapter.h (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerAdapter.h Wed Jan 31 12:17:14 2007
@@ -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 @@
*
* 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;
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerChannel.h
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerChannel.h?view=diff&rev=501973&r1=501972&r2=501973
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerChannel.h (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/broker/BrokerChannel.h Wed Jan 31 12:17:14 2007
@@ -47,7 +47,6 @@
#include <AMQHeaderBody.h>
#include <AMQHeartbeatBody.h>
#include <BasicPublishBody.h>
-#include "ChannelAdapter.h"
namespace qpid {
namespace broker {
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/broker/Connection.h
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/broker/Connection.h?view=diff&rev=501973&r1=501972&r2=501973
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/broker/Connection.h (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/broker/Connection.h Wed Jan 31 12:17:14 2007
@@ -70,10 +70,9 @@
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 @@
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);
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/client/Connection.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/client/Connection.cpp?view=diff&rev=501973&r1=501972&r2=501973
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/client/Connection.cpp (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/client/Connection.cpp Wed Jan 31 12:17:14 2007
@@ -113,6 +113,7 @@
}
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
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/AMQMethodBody.h
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/AMQMethodBody.h?view=diff&rev=501973&r1=501972&r2=501973
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/AMQMethodBody.h (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/AMQMethodBody.h Wed Jan 31 12:17:14 2007
@@ -53,8 +53,6 @@
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;
}
Modified: incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/Responder.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/Responder.cpp?view=diff&rev=501973&r1=501972&r2=501973
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/Responder.cpp (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/lib/common/framing/Responder.cpp Wed Jan 31 12:17:14 2007
@@ -15,6 +15,7 @@
* limitations under the License.
*
*/
+#include <boost/format.hpp>
#include "Responder.h"
#include "QpidError.h"
@@ -25,15 +26,16 @@
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;
}