summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/Network/BoostNetworkFactories.cpp2
-rw-r--r--Swiften/Network/BoostNetworkFactories.h2
-rw-r--r--Swiften/Network/ConnectionServerFactory.h2
-rw-r--r--Swiften/Network/HostAddress.cpp4
-rw-r--r--Swiften/Network/HostAddress.h1
5 files changed, 8 insertions, 3 deletions
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_;