diff options
Diffstat (limited to 'Swiften/Client/CoreClient.cpp')
| -rw-r--r-- | Swiften/Client/CoreClient.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp index 4438135..f6a3bb8 100644 --- a/Swiften/Client/CoreClient.cpp +++ b/Swiften/Client/CoreClient.cpp @@ -1,3 +1,3 @@ /* - * Copyright (c) 2010-2011 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. @@ -9,2 +9,3 @@ #include <boost/bind.hpp> +#include <boost/optional.hpp> #include <boost/smart_ptr/make_shared.hpp> @@ -110,5 +111,9 @@ void CoreClient::connect(const ClientOptions& o) { int port = o.manualPort; + boost::optional<std::string> serviceLookupPrefix; + if (o.manualHostname.empty()) { + serviceLookupPrefix = "_xmpp-client._tcp."; + } assert(!connector_); if (options.boshURL.isEmpty()) { - connector_ = boost::make_shared<ChainedConnector>(host, port, o.manualHostname.empty(), networkFactories->getDomainNameResolver(), connectionFactories, networkFactories->getTimerFactory()); + connector_ = boost::make_shared<ChainedConnector>(host, port, serviceLookupPrefix, networkFactories->getDomainNameResolver(), connectionFactories, networkFactories->getTimerFactory()); connector_->onConnectFinished.connect(boost::bind(&CoreClient::handleConnectorFinished, this, _1, _2)); |
Swift