aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-08-31 15:16:27 +0200
committerChristian Schneppe <christian@pix-art.de>2019-08-31 15:16:27 +0200
commit7610493b1eb09bb80a63665ea12cc24464401964 (patch)
tree09a58bd6ce6cf90aec1412821d97e6d7e6c989d1 /src/main/java/de
parent611f28fbd06da364e51e244c9b12a70c3f390362 (diff)
fix SOCKS5 to IBB fallback
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java9
1 files changed, 4 insertions, 5 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 2a409fedc..83ef9ca33 100644
--- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java
@@ -851,18 +851,17 @@ public class JingleConnection implements Transferable {
private boolean receiveFallbackToIbb(JinglePacket packet) {
Log.d(Config.LOGTAG, "receiving fallack to ibb");
- String receivedBlockSize = packet.getJingleContent().ibbTransport()
- .getAttribute("block-size");
+ final String receivedBlockSize = packet.getJingleContent().ibbTransport().getAttribute("block-size");
if (receivedBlockSize != null) {
- int bs = Integer.parseInt(receivedBlockSize);
- if (bs > this.ibbBlockSize) {
+ final int bs = Integer.parseInt(receivedBlockSize);
+ if (bs < this.ibbBlockSize) {
this.ibbBlockSize = bs;
}
}
this.transportId = packet.getJingleContent().getTransportId();
this.transport = new JingleInbandTransport(this, this.transportId, this.ibbBlockSize);
- JinglePacket answer = bootstrapPacket("transport-accept");
+ final JinglePacket answer = bootstrapPacket("transport-accept");
final Content content = new Content(contentCreator, contentName);
content.setFileOffer(fileOffer, ftVersion);