From 7d0e9c3d963ffcb3f7d6d313dfa55466beb742b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 18 Jun 2011 18:26:26 +0200
Subject: Small tweaks to the previous patch.


diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp
index 6d1cc71..1d9479a 100644
--- a/Swiften/Network/BoostNetworkFactories.cpp
+++ b/Swiften/Network/BoostNetworkFactories.cpp
@@ -20,10 +20,10 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) {
 }
 
 BoostNetworkFactories::~BoostNetworkFactories() {
+	delete connectionServerFactory;
 	delete domainNameResolver;
 	delete connectionFactory;
 	delete timerFactory;
-	delete connectionServerFactory;
 }
 
 }
diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h
index d9fb566..e4d3128 100644
--- a/Swiften/Network/BoostNetworkFactories.h
+++ b/Swiften/Network/BoostNetworkFactories.h
@@ -42,6 +42,6 @@ namespace Swift {
 			TimerFactory* timerFactory;
 			ConnectionFactory* connectionFactory;
 			DomainNameResolver* domainNameResolver;
-			ConnectionServerFactory *connectionServerFactory;
+			ConnectionServerFactory* connectionServerFactory;
 	};
 }
diff --git a/Swiften/Network/ConnectionServerFactory.h b/Swiften/Network/ConnectionServerFactory.h
index c516007..df5f912 100644
--- a/Swiften/Network/ConnectionServerFactory.h
+++ b/Swiften/Network/ConnectionServerFactory.h
@@ -18,6 +18,6 @@ namespace Swift {
 
 			virtual boost::shared_ptr<ConnectionServer> createConnectionServer(int port) = 0;
 
-			virtual boost::shared_ptr<ConnectionServer> createConnectionServer(const Swift::HostAddress &hostAddress, int port) = 0;
+			virtual boost::shared_ptr<ConnectionServer> createConnectionServer(const Swift::HostAddress& hostAddress, int port) = 0;
 	};
 }
diff --git a/Swiften/Network/HostAddress.cpp b/Swiften/Network/HostAddress.cpp
index 7acd407..2ca1414 100644
--- a/Swiften/Network/HostAddress.cpp
+++ b/Swiften/Network/HostAddress.cpp
@@ -57,4 +57,8 @@ bool HostAddress::isValid() const {
 	return !(address_.is_v4() && address_.to_v4().to_ulong() == 0);
 }
 
+boost::asio::ip::address HostAddress::getRawAddress() const {
+	return address_;
+}
+
 }
diff --git a/Swiften/Network/HostAddress.h b/Swiften/Network/HostAddress.h
index 34ccd24..4b05c32 100644
--- a/Swiften/Network/HostAddress.h
+++ b/Swiften/Network/HostAddress.h
@@ -21,6 +21,7 @@ namespace Swift {
 			HostAddress(const boost::asio::ip::address& address);
 
 			std::string toString() const;
+			boost::asio::ip::address getRawAddress() const;
 
 			bool operator==(const HostAddress& o) const {
 				return address_ == o.address_;
-- 
cgit v0.10.2-6-g49f6