From bfa6799afb3a65fb6ceeaf042612851f19fc7662 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Tue, 2 Oct 2012 14:18:03 +0100 Subject: Protect against null manual hostnames 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() { public void call(Connection p1, com.isode.stroke.base.Error p2) { handleConnectorFinished(p1, p2); -- cgit v0.10.2-6-g49f6