From 169e5fa001c817b170da6f991edfa994cf2d7f45 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Tue, 13 Dec 2011 17:09:18 +0000
Subject: Fix use of int randoms for populating long


diff --git a/Swiften/Network/HTTPConnectProxiedConnection.cpp b/Swiften/Network/HTTPConnectProxiedConnection.cpp
index edbdd82..9ef63f0 100644
--- a/Swiften/Network/HTTPConnectProxiedConnection.cpp
+++ b/Swiften/Network/HTTPConnectProxiedConnection.cpp
@@ -34,6 +34,7 @@ HTTPConnectProxiedConnection::HTTPConnectProxiedConnection(ConnectionFactory* co
 
 HTTPConnectProxiedConnection::~HTTPConnectProxiedConnection() {
 	if (connection_) {
+		connection_->onConnectFinished.disconnect(boost::bind(&HTTPConnectProxiedConnection::handleConnectionConnectFinished, shared_from_this(), _1));
 		connection_->onDataRead.disconnect(boost::bind(&HTTPConnectProxiedConnection::handleDataRead, shared_from_this(), _1));
 		connection_->onDisconnected.disconnect(boost::bind(&HTTPConnectProxiedConnection::handleDisconnected, shared_from_this(), _1));
 	}
diff --git a/Swiften/Session/BOSHSessionStream.cpp b/Swiften/Session/BOSHSessionStream.cpp
index 95390f4..73bbfd6 100644
--- a/Swiften/Session/BOSHSessionStream.cpp
+++ b/Swiften/Session/BOSHSessionStream.cpp
@@ -48,9 +48,9 @@ BOSHSessionStream::BOSHSessionStream(
 			firstHeader(true) {
 
 	boost::mt19937 random;
-	boost::uniform_int<> dist(0, LONG_MAX);
+	boost::uniform_int<long> dist(0, LONG_MAX);
 	random.seed(time(NULL));
-	boost::variate_generator<boost::mt19937&, boost::uniform_int<> > randomRID(random, dist);
+	boost::variate_generator<boost::mt19937&, boost::uniform_int<long> > randomRID(random, dist);
 	long initialRID = randomRID();
 
 	connectionPool = new BOSHConnectionPool(connectionFactory, to, initialRID, boshHTTPConnectProxyURL, boshHTTPConnectProxyAuthID, boshHTTPConnectProxyAuthPassword);
-- 
cgit v0.10.2-6-g49f6