mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +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> {
|
|||
}
|
||||
}
|
||||
|
||||
toReturn.setMode((Bytestream.Mode.fromName(mode)));
|
||||
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