diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-10-16 08:09:03 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-10-16 08:09:03 (GMT) |
commit | 9e6b127cf35319b0e89d4d6f4dff55a80ce03c02 (patch) | |
tree | 82bc0006bf3d5648ed813d9ddcfc01c1ef404f46 /Swiften/Client | |
parent | 3a60cfec978c512c7b4bbe6c04a0ca3fbdf1e51e (diff) | |
download | swift-9e6b127cf35319b0e89d4d6f4dff55a80ce03c02.zip swift-9e6b127cf35319b0e89d4d6f4dff55a80ce03c02.tar.bz2 |
Hoist TLSContextFactory creation out of Client.
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/CoreClient.cpp | 5 | ||||
-rw-r--r-- | Swiften/Client/CoreClient.h | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp index 22e3612..2a66905 100644 --- a/Swiften/Client/CoreClient.cpp +++ b/Swiften/Client/CoreClient.cpp @@ -14,7 +14,6 @@ #include <Swiften/Base/foreach.h> #include <Swiften/Base/Algorithm.h> #include <Swiften/Client/ClientSession.h> -#include <Swiften/TLS/PlatformTLSFactories.h> #include <Swiften/TLS/CertificateVerificationError.h> #include <Swiften/Network/ChainedConnector.h> #include <Swiften/Network/NetworkFactories.h> @@ -37,12 +36,10 @@ CoreClient::CoreClient(const JID& jid, const SafeByteArray& password, NetworkFac iqRouter_ = new IQRouter(stanzaChannel_); iqRouter_->setJID(jid); - tlsFactories = new PlatformTLSFactories(); } CoreClient::~CoreClient() { forceReset(); - delete tlsFactories; delete iqRouter_; stanzaChannel_->onAvailableChanged.disconnect(boost::bind(&CoreClient::handleStanzaChannelAvailableChanged, this, _1)); @@ -94,7 +91,7 @@ void CoreClient::handleConnectorFinished(boost::shared_ptr<Connection> connectio connection_ = connection; assert(!sessionStream_); - sessionStream_ = boost::make_shared<BasicSessionStream>(ClientStreamType, connection_, getPayloadParserFactories(), getPayloadSerializers(), tlsFactories->getTLSContextFactory(), networkFactories->getTimerFactory(), networkFactories->getXMLParserFactory()); + sessionStream_ = boost::make_shared<BasicSessionStream>(ClientStreamType, connection_, getPayloadParserFactories(), getPayloadSerializers(), networkFactories->getTLSContextFactory(), networkFactories->getTimerFactory(), networkFactories->getXMLParserFactory()); if (!certificate_.empty()) { sessionStream_->setTLSCertificate(PKCS12Certificate(certificate_, password_)); } diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h index ad31e72..3c089c1 100644 --- a/Swiften/Client/CoreClient.h +++ b/Swiften/Client/CoreClient.h @@ -30,7 +30,6 @@ namespace Swift { class StanzaChannel; class Stanza; class BasicSessionStream; - class PlatformTLSFactories; class CertificateTrustChecker; class NetworkFactories; class ClientSessionStanzaChannel; @@ -222,7 +221,6 @@ namespace Swift { ClientOptions options; boost::shared_ptr<ChainedConnector> connector_; std::vector<ConnectionFactory*> proxyConnectionFactories; - PlatformTLSFactories* tlsFactories; boost::shared_ptr<Connection> connection_; boost::shared_ptr<BasicSessionStream> sessionStream_; boost::shared_ptr<ClientSession> session_; |