summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Hudson <nick.hudson@isode.com>2014-02-07 10:29:11 (GMT)
committerSwift Review <review@swift.im>2014-04-22 08:01:43 (GMT)
commitcafd510a0efc9df985999ceded57efa1d411de2e (patch)
treeaf00a2797062c0eb0ae69db4a6f3fa11047ef5a7 /src/com/isode/stroke/client
parenta511087b1f57f1f6372374f41d0b4b7ebeef9930 (diff)
downloadstroke-cafd510a0efc9df985999ceded57efa1d411de2e.zip
stroke-cafd510a0efc9df985999ceded57efa1d411de2e.tar.bz2
Move hardcoded XMPP SRV information from Connector into CoreClient
The Connector class had "_xmpp-client._tcp." hard-coded in it, which meant that it was not suitable for non XMPP clients. This change means that Connector could now be used by clients who are interested in arbitrary SRV records; the CoreClient class is updated accordingly. Test-information: Built and tested using MLC. Also tested with a client that is interested in IMAP SRV records Change-Id: Ia23c148fd8afdd7b3271c47b1c96d086d57a44bd
Diffstat (limited to 'src/com/isode/stroke/client')
-rw-r--r--src/com/isode/stroke/client/CoreClient.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/isode/stroke/client/CoreClient.java b/src/com/isode/stroke/client/CoreClient.java
index 524a05a..646f8fe 100644
--- a/src/com/isode/stroke/client/CoreClient.java
+++ b/src/com/isode/stroke/client/CoreClient.java
@@ -187,7 +187,8 @@ public class CoreClient {
/* FIXME: Port Proxies */
String host = (o.manualHostname == null || o.manualHostname.isEmpty()) ? jid_.getDomain() : o.manualHostname;
int port = o.manualPort;
- connector_ = Connector.create(host, port, o.manualHostname == null || o.manualHostname.isEmpty(), networkFactories.getDomainNameResolver(), networkFactories.getConnectionFactory(), networkFactories.getTimerFactory());
+ String serviceLookupPrefix = (o.manualHostname == null || o.manualHostname.isEmpty() ? "_xmpp-client._tcp." : null);
+ connector_ = Connector.create(host, port, serviceLookupPrefix, networkFactories.getDomainNameResolver(), networkFactories.getConnectionFactory(), networkFactories.getTimerFactory());
connectorConnectFinishedConnection_ = connector_.onConnectFinished.connect(new Slot2<Connection, com.isode.stroke.base.Error>() {
public void call(Connection p1, com.isode.stroke.base.Error p2) {
handleConnectorFinished(p1, p2);