diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-19 23:14:17 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-19 23:14:17 +0200 |
commit | c9238ef5ae2bc0facd89c53afd2c5ed6e16a10a7 (patch) | |
tree | 3b5fa901c3936ad883a0e1180a29a38e19ae96dc /src | |
parent | a201f9e53f33109836a690488b9f8a98db4f5249 (diff) |
force tls for registrations as well
Diffstat (limited to 'src')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/XmppConnection.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index be56927c..debcaa51 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -583,10 +583,10 @@ public class XmppConnection implements Runnable { } else if (compressionAvailable()) { sendCompressionZlib(); } else if (this.streamFeatures.hasChild("register") - && (account.isOptionSet(Account.OPTION_REGISTER))) { + && account.isOptionSet(Account.OPTION_REGISTER) && usingEncryption) { sendRegistryRequest(); } else if (!this.streamFeatures.hasChild("register") - && (account.isOptionSet(Account.OPTION_REGISTER))) { + && account.isOptionSet(Account.OPTION_REGISTER)) { changeStatus(Account.STATUS_REGISTRATION_NOT_SUPPORTED); disconnect(true); } else if (this.streamFeatures.hasChild("mechanisms") @@ -606,6 +606,9 @@ public class XmppConnection implements Runnable { this.tagWriter.writeStanzaAsync(resume); } else if (this.streamFeatures.hasChild("bind") && shouldBind) { sendBindRequest(); + } else { + Log.d(Config.LOGTAG,account.getJid()+": incompatible server. disconnecting"); + disconnect(true); } } |