diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-10-02 13:18:03 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-10-02 13:18:03 (GMT) |
commit | bfa6799afb3a65fb6ceeaf042612851f19fc7662 (patch) | |
tree | 562b78b9e42054a496c976c5f3fac41364875e62 /src/com/isode | |
parent | df169511d4201a8850a99e07d3b437a23391b4bd (diff) | |
download | stroke-bfa6799afb3a65fb6ceeaf042612851f19fc7662.zip stroke-bfa6799afb3a65fb6ceeaf042612851f19fc7662.tar.bz2 |
Protect against null manual hostnames
Diffstat (limited to 'src/com/isode')
-rw-r--r-- | src/com/isode/stroke/client/CoreClient.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/isode/stroke/client/CoreClient.java b/src/com/isode/stroke/client/CoreClient.java index 55284d6..5ca69bf 100644 --- a/src/com/isode/stroke/client/CoreClient.java +++ b/src/com/isode/stroke/client/CoreClient.java @@ -133,9 +133,9 @@ public class CoreClient { disconnectRequested_ = false; assert (connector_ == null); /* FIXME: Port Proxies */ - String host = o.manualHostname.isEmpty() ? jid_.getDomain() : o.manualHostname; + String host = (o.manualHostname == null || o.manualHostname.isEmpty()) ? jid_.getDomain() : o.manualHostname; int port = o.manualPort; - connector_ = Connector.create(host, port, o.manualHostname.isEmpty(), networkFactories.getDomainNameResolver(), networkFactories.getConnectionFactory(), networkFactories.getTimerFactory()); + connector_ = Connector.create(host, port, o.manualHostname == null || o.manualHostname.isEmpty(), 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); |