aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-05-31 23:09:45 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-05-31 23:09:45 +0200
commitffba53777cac07e8a3f16fb9dbbdaa61d87a09bd (patch)
tree7118a553badecbdec4c01784c90987d74201fc38 /src/main/java/eu/siacs
parentea6a008b39b0f669f66f3c8aec08b4deb3ece154 (diff)
check if session is optional
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 9a8a55fb..1128907e 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -924,7 +924,8 @@ public class XmppConnection implements Runnable {
if (jid != null && jid.getContent() != null) {
try {
account.setResource(Jid.fromString(jid.getContent()).getResourcepart());
- if (streamFeatures.hasChild("session")) {
+ if (streamFeatures.hasChild("session")
+ && !streamFeatures.findChild("session").hasChild("optional")) {
sendStartSession();
} else {
sendPostBindInitialization();
@@ -990,6 +991,7 @@ public class XmppConnection implements Runnable {
}
private void sendStartSession() {
+ Log.d(Config.LOGTAG,account.getJid().toBareJid()+": sending legacy session to outdated server");
final IqPacket startSession = new IqPacket(IqPacket.TYPE.SET);
startSession.addChild("session", "urn:ietf:params:xml:ns:xmpp-session");
this.sendUnmodifiedIqPacket(startSession, new OnIqPacketReceived() {