summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/Connector.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-06-27 21:19:14 +0000
committerAlan Conway <aconway@apache.org>2007-06-27 21:19:14 +0000
commit0efcf2c5c91f4927ccc00ad1cf391c2f964cc2e1 (patch)
treea9318ac4787cf588dd1329c2e557d8f870be20cc /cpp/src/qpid/client/Connector.cpp
parent548abd065f91bc1f238ac98c24edf410edf10356 (diff)
downloadqpid-python-0efcf2c5c91f4927ccc00ad1cf391c2f964cc2e1.tar.gz
* src/qpid/framing/ChannelAdapter.cpp: Use handler chains
for in and outbound frames. * src/qpid/framing/InputHandler.h, OutputHandler.h, FrameHandler.h: All handlers pass AMQFrame& and have consistent memory management. Terminal OutputHandlers used to take ownership and delete frame, now they make a shallow copy instead. * src/qpid/framing/Handler.h, FrameHandler.h: Simplified. * src/qpid/client/ClientConnection.cpp: * src/qpid/broker/Connection.cpp: * src/qpid/broker/BrokerChannel.cpp: Update for ChannelAdapter changes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551336 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Connector.cpp')
-rw-r--r--cpp/src/qpid/client/Connector.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/qpid/client/Connector.cpp b/cpp/src/qpid/client/Connector.cpp
index 17b68c1f6a..257e2b577a 100644
--- a/cpp/src/qpid/client/Connector.cpp
+++ b/cpp/src/qpid/client/Connector.cpp
@@ -22,6 +22,7 @@
#include "qpid/log/Statement.h"
#include "qpid/QpidError.h"
#include "qpid/sys/Time.h"
+#include "qpid/framing/AMQFrame.h"
#include "Connector.h"
namespace qpid {
@@ -91,11 +92,9 @@ OutputHandler* Connector::getOutputHandler(){
return this;
}
-void Connector::send(AMQFrame* f){
- std::auto_ptr<AMQFrame> frame(f);
- AMQBody::shared_ptr body = frame->getBody();
- writeBlock(frame.get());
- QPID_LOG(trace, "SENT: " << *frame);
+void Connector::send(AMQFrame& frame){
+ writeBlock(&frame);
+ QPID_LOG(trace, "SENT: " << frame);
}
void Connector::writeBlock(AMQDataBlock* data){
@@ -185,7 +184,7 @@ void Connector::run(){
AMQFrame frame(version);
while(frame.decode(inbuf)){
QPID_LOG(trace, "RECV: " << frame);
- input->received(&frame);
+ input->received(frame);
}
//need to compact buffer to preserve any 'extra' data
inbuf.compact();