diff options
Diffstat (limited to 'Swiften/Session/BOSHSessionStream.cpp')
-rw-r--r-- | Swiften/Session/BOSHSessionStream.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Swiften/Session/BOSHSessionStream.cpp b/Swiften/Session/BOSHSessionStream.cpp index 237a394..63e35b8 100644 --- a/Swiften/Session/BOSHSessionStream.cpp +++ b/Swiften/Session/BOSHSessionStream.cpp @@ -1,4 +1,4 @@ /* - * Copyright (c) 2011 Kevin Smith + * Copyright (c) 2011-2014 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -42,9 +42,4 @@ BOSHSessionStream::BOSHSessionStream( const SafeString& boshHTTPConnectProxyAuthPassword) : available(false), - payloadParserFactories(payloadParserFactories), - payloadSerializers(payloadSerializers), - tlsContextFactory(tlsContextFactory), - timerFactory(timerFactory), - xmlParserFactory(xmlParserFactory), eventLoop(eventLoop), firstHeader(true) { @@ -52,5 +47,5 @@ BOSHSessionStream::BOSHSessionStream( boost::mt19937 random; boost::uniform_int<unsigned long long> dist(0, (1LL<<53) - 1); - random.seed(time(NULL)); + random.seed(static_cast<unsigned int>(time(NULL))); unsigned long long initialRID = boost::variate_generator<boost::mt19937&, boost::uniform_int<unsigned long long> >(random, dist)(); @@ -62,5 +57,5 @@ BOSHSessionStream::BOSHSessionStream( connectionPool->onBOSHDataWritten.connect(boost::bind(&BOSHSessionStream::handlePoolBOSHDataWritten, this, _1)); - xmppLayer = new XMPPLayer(payloadParserFactories, payloadSerializers, xmlParserFactory, ClientStreamType); + xmppLayer = new XMPPLayer(payloadParserFactories, payloadSerializers, xmlParserFactory, ClientStreamType, true); xmppLayer->onStreamStart.connect(boost::bind(&BOSHSessionStream::handleStreamStartReceived, this, _1)); xmppLayer->onElement.connect(boost::bind(&BOSHSessionStream::handleElementReceived, this, _1)); @@ -92,5 +87,5 @@ void BOSHSessionStream::handlePoolXMPPDataRead(const SafeByteArray& data) { } -void BOSHSessionStream::writeElement(boost::shared_ptr<Element> element) { +void BOSHSessionStream::writeElement(boost::shared_ptr<ToplevelElement> element) { assert(available); xmppLayer->writeElement(element); @@ -130,4 +125,8 @@ Certificate::ref BOSHSessionStream::getPeerCertificate() const { } +std::vector<Certificate::ref> BOSHSessionStream::getPeerCertificateChain() const { + return std::vector<Certificate::ref>(); +} + boost::shared_ptr<CertificateVerificationError> BOSHSessionStream::getPeerCertificateVerificationError() const { return boost::shared_ptr<CertificateVerificationError>(); @@ -158,5 +157,5 @@ void BOSHSessionStream::handleStreamStartReceived(const ProtocolHeader& header) } -void BOSHSessionStream::handleElementReceived(boost::shared_ptr<Element> element) { +void BOSHSessionStream::handleElementReceived(boost::shared_ptr<ToplevelElement> element) { onElementReceived(element); } @@ -214,3 +213,3 @@ void BOSHSessionStream::handlePoolBOSHDataWritten(const SafeByteArray& data) { } -}; +} |