summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-01-17 07:54:39 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-01-17 20:30:57 (GMT)
commit093d499945d779cfed92b45e413644834004b0d9 (patch)
tree537347674b8285295be9f38b1b27f9fe62a40895 /Swiften/Network/Connector.cpp
parente3e6e344dbb7df85e5f13eef944285ea2262e980 (diff)
downloadswift-contrib-093d499945d779cfed92b45e413644834004b0d9.zip
swift-contrib-093d499945d779cfed92b45e413644834004b0d9.tar.bz2
Allow specifying BOSH and BOSH proxy URLs with names (rather than IPs)
Diffstat (limited to 'Swiften/Network/Connector.cpp')
-rw-r--r--Swiften/Network/Connector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Network/Connector.cpp b/Swiften/Network/Connector.cpp
index 8f35aba..378875b 100644
--- a/Swiften/Network/Connector.cpp
+++ b/Swiften/Network/Connector.cpp
@@ -17,7 +17,7 @@
namespace Swift {
-Connector::Connector(const std::string& hostname, DomainNameResolver* resolver, ConnectionFactory* connectionFactory, TimerFactory* timerFactory) : hostname(hostname), resolver(resolver), connectionFactory(connectionFactory), timerFactory(timerFactory), timeoutMilliseconds(0), queriedAllServices(true) {
+Connector::Connector(const std::string& hostname, DomainNameResolver* resolver, ConnectionFactory* connectionFactory, TimerFactory* timerFactory, int defaultPort) : hostname(hostname), resolver(resolver), connectionFactory(connectionFactory), timerFactory(timerFactory), defaultPort(defaultPort), timeoutMilliseconds(0), queriedAllServices(true) {
}
void Connector::setTimeoutMilliseconds(int milliseconds) {
@@ -105,7 +105,7 @@ void Connector::tryNextAddress() {
HostAddress address = addressQueryResults.front();
addressQueryResults.pop_front();
- int port = 5222;
+ int port = defaultPort;
if (!serviceQueryResults.empty()) {
port = serviceQueryResults.front().port;
}