diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-14 20:50:16 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-15 17:14:09 +0100 |
commit | f5d5be2b3c93d16fa6e86ba70215df819d48a3e7 (patch) | |
tree | 0c343842ec5b4e63b03c4cf5a81070517152562a /src | |
parent | b73774260ab692f0c801ec09ec7f7e1d397a820e (diff) |
allow jingle state transition for fallback after proxy failure
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java index 9ac39ed5c..5ea81b10f 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java @@ -940,11 +940,13 @@ public class JingleConnection implements Transferable { respondToIqWithOutOfOrder(packet); return; } - if (mJingleStatus != JINGLE_STATUS_ACCEPTED && !proxyActivationFailed) { + final boolean validState = mJingleStatus == JINGLE_STATUS_ACCEPTED || (proxyActivationFailed && mJingleStatus == JINGLE_STATUS_TRANSMITTING); + if (!validState) { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": received out of order transport-replace"); respondToIqWithOutOfOrder(packet); return; } + this.proxyActivationFailed = false; //fallback received; now we no longer need to accept another one; Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": receiving fallback to ibb"); final String receivedBlockSize = packet.getJingleContent().ibbTransport().getAttribute("block-size"); if (receivedBlockSize != null) { @@ -988,11 +990,13 @@ public class JingleConnection implements Transferable { respondToIqWithOutOfOrder(packet); return; } - if (this.mJingleStatus != JINGLE_STATUS_ACCEPTED) { + final boolean validState = mJingleStatus == JINGLE_STATUS_ACCEPTED || (proxyActivationFailed && mJingleStatus == JINGLE_STATUS_TRANSMITTING); + if (!validState) { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": received out of order transport-accept"); respondToIqWithOutOfOrder(packet); return; } + this.proxyActivationFailed = false; //fallback accepted; now we no longer need to accept another one; if (packet.getJingleContent().hasIbbTransport()) { final Element ibbTransport = packet.getJingleContent().ibbTransport(); final String receivedBlockSize = ibbTransport.getAttribute("block-size"); |