diff options
Diffstat (limited to 'Swiften/Session/BOSHSessionStream.cpp')
-rw-r--r-- | Swiften/Session/BOSHSessionStream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Session/BOSHSessionStream.cpp b/Swiften/Session/BOSHSessionStream.cpp index 73bbfd6..f53b8e1 100644 --- a/Swiften/Session/BOSHSessionStream.cpp +++ b/Swiften/Session/BOSHSessionStream.cpp @@ -27,9 +27,10 @@ namespace Swift { BOSHSessionStream::BOSHSessionStream( - boost::shared_ptr<BOSHConnectionFactory> connectionFactory, /*FIXME: probably rip out*/ + const URL& boshURL, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, + ConnectionFactory* connectionFactory, TLSContextFactory* tlsContextFactory, TimerFactory* timerFactory, XMLParserFactory* xmlParserFactory, @@ -48,12 +49,11 @@ BOSHSessionStream::BOSHSessionStream( firstHeader(true) { boost::mt19937 random; - boost::uniform_int<long> dist(0, LONG_MAX); + boost::uniform_int<long long> dist(0, (1LL<<53) - 1); random.seed(time(NULL)); - boost::variate_generator<boost::mt19937&, boost::uniform_int<long> > randomRID(random, dist); - long initialRID = randomRID(); + long long initialRID = boost::variate_generator<boost::mt19937&, boost::uniform_int<long long> >(random, dist)(); - connectionPool = new BOSHConnectionPool(connectionFactory, to, initialRID, boshHTTPConnectProxyURL, boshHTTPConnectProxyAuthID, boshHTTPConnectProxyAuthPassword); + connectionPool = new BOSHConnectionPool(boshURL, connectionFactory, xmlParserFactory, tlsContextFactory, to, initialRID, boshHTTPConnectProxyURL, boshHTTPConnectProxyAuthID, boshHTTPConnectProxyAuthPassword); connectionPool->onSessionTerminated.connect(boost::bind(&BOSHSessionStream::handlePoolSessionTerminated, this, _1)); connectionPool->onSessionStarted.connect(boost::bind(&BOSHSessionStream::handlePoolSessionStarted, this)); connectionPool->onXMPPDataRead.connect(boost::bind(&BOSHSessionStream::handlePoolXMPPDataRead, this, _1)); |