From 58efa10f3ed794dac024a1995e871a1368faeddc Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 9 Nov 2009 15:30:18 +0000 Subject: QPID-1899: Applied patch from Ken Giusti to tie in SASL enctryption to the handling of the --require-encrypted option git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834108 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/ConnectionCodec.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cpp/src/qpid/cluster/ConnectionCodec.cpp') diff --git a/cpp/src/qpid/cluster/ConnectionCodec.cpp b/cpp/src/qpid/cluster/ConnectionCodec.cpp index 4ff8b0a4a3..8f6f1d9ad5 100644 --- a/cpp/src/qpid/cluster/ConnectionCodec.cpp +++ b/cpp/src/qpid/cluster/ConnectionCodec.cpp @@ -36,25 +36,27 @@ namespace cluster { using namespace framing; sys::ConnectionCodec* -ConnectionCodec::Factory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id) { +ConnectionCodec::Factory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id, + unsigned int ssf) { if (v == ProtocolVersion(0, 10)) - return new ConnectionCodec(v, out, id, cluster, false, false); + return new ConnectionCodec(v, out, id, cluster, false, false, ssf); else if (v == ProtocolVersion(0x80 + 0, 0x80 + 10)) // Catch-up connection - return new ConnectionCodec(v, out, id, cluster, true, false); + return new ConnectionCodec(v, out, id, cluster, true, false, ssf); return 0; } // Used for outgoing Link connections sys::ConnectionCodec* -ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& logId) { - return new ConnectionCodec(ProtocolVersion(0,10), out, logId, cluster, false, true); +ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& logId, + unsigned int ssf) { + return new ConnectionCodec(ProtocolVersion(0,10), out, logId, cluster, false, true, ssf); } ConnectionCodec::ConnectionCodec( const ProtocolVersion& v, sys::OutputControl& out, - const std::string& logId, Cluster& cluster, bool catchUp, bool isLink + const std::string& logId, Cluster& cluster, bool catchUp, bool isLink, unsigned int ssf ) : codec(out, logId, isLink), - interceptor(new Connection(cluster, codec, logId, cluster.getId(), catchUp, isLink)) + interceptor(new Connection(cluster, codec, logId, cluster.getId(), catchUp, isLink, ssf)) { std::auto_ptr ih(new ProxyInputHandler(interceptor)); codec.setInputHandler(ih); -- cgit v1.2.1