diff options
Diffstat (limited to 'cpp/src/qpid/client')
-rw-r--r-- | cpp/src/qpid/client/Channel.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/client/Channel.h | 1 | ||||
-rw-r--r-- | cpp/src/qpid/client/ConnectionHandler.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/client/ExecutionHandler.cpp | 16 | ||||
-rw-r--r-- | cpp/src/qpid/client/FutureResponse.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/client/FutureResponse.h | 4 | ||||
-rw-r--r-- | cpp/src/qpid/client/SessionCore.cpp | 2 |
8 files changed, 16 insertions, 19 deletions
diff --git a/cpp/src/qpid/client/Channel.cpp b/cpp/src/qpid/client/Channel.cpp index 2d43d300dd..3551946d1e 100644 --- a/cpp/src/qpid/client/Channel.cpp +++ b/cpp/src/qpid/client/Channel.cpp @@ -33,10 +33,6 @@ #include <boost/bind.hpp> #include "qpid/framing/all_method_bodies.h" -// FIXME aconway 2007-01-26: Evaluate all throws, ensure consistent -// handling of errors that should close the connection or the channel. -// Make sure the user thread receives a connection in each case. -// using namespace std; using namespace boost; using namespace qpid::framing; diff --git a/cpp/src/qpid/client/Channel.h b/cpp/src/qpid/client/Channel.h index c1f74e0706..2907da01c6 100644 --- a/cpp/src/qpid/client/Channel.h +++ b/cpp/src/qpid/client/Channel.h @@ -93,7 +93,6 @@ class Channel : private sys::Runnable void dispatch(framing::FrameSet& msg, const std::string& destination); - // FIXME aconway 2007-02-23: Get rid of friendships. friend class Connection; public: diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index a8f10c32a9..cbdeff9cff 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -112,7 +112,7 @@ void ConnectionHandler::close() void ConnectionHandler::send(const framing::AMQBody& body) { - AMQFrame f(0, body); + AMQFrame f(body); out(f); } diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index f9273bc165..1ae8a25d6b 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/ConnectionImpl.cpp @@ -97,7 +97,7 @@ void ConnectionImpl::idleIn() void ConnectionImpl::idleOut() { - AMQFrame frame(0, new AMQHeartbeatBody()); + AMQFrame frame(in_place<AMQHeartbeatBody>()); connector->send(frame); } diff --git a/cpp/src/qpid/client/ExecutionHandler.cpp b/cpp/src/qpid/client/ExecutionHandler.cpp index c70b0fc455..7b8fb8d01f 100644 --- a/cpp/src/qpid/client/ExecutionHandler.cpp +++ b/cpp/src/qpid/client/ExecutionHandler.cpp @@ -118,7 +118,7 @@ void ExecutionHandler::flushTo(const framing::SequenceNumber& point) void ExecutionHandler::sendFlushRequest() { Mutex::ScopedLock l(lock); - AMQFrame frame(0, ExecutionFlushBody()); + AMQFrame frame(in_place<ExecutionFlushBody>()); out(frame); } @@ -134,7 +134,7 @@ void ExecutionHandler::syncTo(const framing::SequenceNumber& point) void ExecutionHandler::sendSyncRequest() { Mutex::ScopedLock l(lock); - AMQFrame frame(0, ExecutionSyncBody()); + AMQFrame frame(in_place<ExecutionSyncBody>()); out(frame); } @@ -161,7 +161,9 @@ void ExecutionHandler::sendCompletion() Mutex::ScopedLock l(lock); SequenceNumberSet range; incomingCompletionStatus.collectRanges(range); - AMQFrame frame(0, ExecutionCompleteBody(version, incomingCompletionStatus.mark.getValue(), range)); + AMQFrame frame( + in_place<ExecutionCompleteBody>( + version, incomingCompletionStatus.mark.getValue(), range)); out(frame); } @@ -177,7 +179,7 @@ SequenceNumber ExecutionHandler::send(const AMQBody& command, CompletionTracker: if(l) { completion.listenForResult(id, l); } - AMQFrame frame(0/*channel will be filled in by channel handler*/, command); + AMQFrame frame(command); if (hasContent) { frame.setEof(false); } @@ -196,7 +198,7 @@ SequenceNumber ExecutionHandler::send(const AMQBody& command, const MethodConten void ExecutionHandler::sendContent(const MethodContent& content) { - AMQFrame header(0, content.getHeader()); + AMQFrame header(content.getHeader()); header.setBof(false); u_int64_t data_length = content.getData().length(); if(data_length > 0){ @@ -205,7 +207,7 @@ void ExecutionHandler::sendContent(const MethodContent& content) //frame itself uses 8 bytes u_int32_t frag_size = maxFrameSize - 8; if(data_length < frag_size){ - AMQFrame frame(0, AMQContentBody(content.getData())); + AMQFrame frame(in_place<AMQContentBody>(content.getData())); frame.setBof(false); out(frame); }else{ @@ -214,7 +216,7 @@ void ExecutionHandler::sendContent(const MethodContent& content) while (remaining > 0) { u_int32_t length = remaining > frag_size ? frag_size : remaining; string frag(content.getData().substr(offset, length)); - AMQFrame frame(0, AMQContentBody(frag)); + AMQFrame frame(in_place<AMQContentBody>(frag)); frame.setBof(false); if (offset > 0) { frame.setBos(false); diff --git a/cpp/src/qpid/client/FutureResponse.cpp b/cpp/src/qpid/client/FutureResponse.cpp index 5d36a1d873..32d99531fa 100644 --- a/cpp/src/qpid/client/FutureResponse.cpp +++ b/cpp/src/qpid/client/FutureResponse.cpp @@ -32,13 +32,13 @@ AMQMethodBody* FutureResponse::getResponse(SessionCore& session) { waitForCompletion(); session.assertOpen(); - return response.get(); + return response.getMethod(); } void FutureResponse::received(const AMQMethodBody* r) { Monitor::ScopedLock l(lock); - response = *r; + response.setBody(*r); complete = true; lock.notifyAll(); } diff --git a/cpp/src/qpid/client/FutureResponse.h b/cpp/src/qpid/client/FutureResponse.h index df3b7c6f30..534ca01bb7 100644 --- a/cpp/src/qpid/client/FutureResponse.h +++ b/cpp/src/qpid/client/FutureResponse.h @@ -23,7 +23,7 @@ #define _FutureResponse_ #include "qpid/framing/amqp_framing.h" -#include "qpid/framing/MethodHolder.h" +#include "qpid/framing/BodyHolder.h" #include "FutureCompletion.h" namespace qpid { @@ -33,7 +33,7 @@ class SessionCore; class FutureResponse : public FutureCompletion { - framing::MethodHolder response; + framing::BodyHolder response; public: framing::AMQMethodBody* getResponse(SessionCore& session); void received(const framing::AMQMethodBody* response); diff --git a/cpp/src/qpid/client/SessionCore.cpp b/cpp/src/qpid/client/SessionCore.cpp index c87eeffc11..8eab54fa62 100644 --- a/cpp/src/qpid/client/SessionCore.cpp +++ b/cpp/src/qpid/client/SessionCore.cpp @@ -403,7 +403,7 @@ void SessionCore::flowOk(bool /*active*/) { } void SessionCore::highWaterMark(uint32_t /*lastSentMark*/) { - // FIXME aconway 2007-10-02: may be removed from spec. + // TODO aconway 2007-10-02: may be removed from spec. assert(0); throw NotImplementedException("session.highWaterMark"); } |