mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Fix BytestreamsProvider: Mode is optional
and defaults to TCP.
This commit is contained in:
parent
9c5b7d263e
commit
2db5ebb4b7
1 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
|||
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.Mode;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
|
@ -81,7 +82,11 @@ public class BytestreamsProvider extends IQProvider<Bytestream> {
|
|||
}
|
||||
}
|
||||
|
||||
if (mode == null) {
|
||||
toReturn.setMode(Mode.tcp);
|
||||
} else {
|
||||
toReturn.setMode((Bytestream.Mode.fromName(mode)));
|
||||
}
|
||||
toReturn.setSessionID(id);
|
||||
return toReturn;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue