From ec73d7c0413d77f56ab9499771a94c409f2f769b 2015-10-03 11:29:48 From: Rion Date: 2015-10-03 11:29:48 Subject: [PATCH] Support old TLSConnectionFactory API as well --- diff --git a/backends/libyahoo2/main.cpp b/backends/libyahoo2/main.cpp index a0214fae3d01fd093a2555c9479fa1e7ea492819..eb5fbe5bf405e5a8ed2ce5a6e49329503eaa7463 100644 --- a/backends/libyahoo2/main.cpp +++ b/backends/libyahoo2/main.cpp @@ -107,7 +107,11 @@ class YahooPlugin : public NetworkPlugin { this->config = config; m_factories = new Swift::BoostNetworkFactories(loop); m_sslFactory = new Swift::OpenSSLContextFactory(); +#if HAVE_SWIFTEN3 m_tlsFactory = new Swift::TLSConnectionFactory(m_sslFactory, m_factories->getConnectionFactory(), Swift::TLSOptions()); +#else + m_tlsFactory = new Swift::TLSConnectionFactory(m_sslFactory, m_factories->getConnectionFactory()); +#endif m_conn = m_factories->getConnectionFactory()->createConnection(); m_conn->onDataRead.connect(boost::bind(&YahooPlugin::_handleDataRead, this, _1)); m_conn->connect(Swift::HostAddressPort(Swift::HostAddress(host), port));