summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-18 16:26:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-18 16:29:31 (GMT)
commit7d0e9c3d963ffcb3f7d6d313dfa55466beb742b9 (patch)
treec136ba17b4fa37e5954e9229cbdcfbeafce0347f /Swiften
parent7147be63a03f1e133f83bc057be98cf9f2631733 (diff)
downloadswift-7d0e9c3d963ffcb3f7d6d313dfa55466beb742b9.zip
swift-7d0e9c3d963ffcb3f7d6d313dfa55466beb742b9.tar.bz2
Small tweaks to the previous patch.
Diffstat (limited to 'Swiften')
-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_;